fix: docker run

This commit is contained in:
Yumin Gui
2025-07-18 21:43:09 -07:00
parent d525e12e17
commit 09aea498f7
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
# 从构建器中复制 scripts 目录
COPY --from=builder --chown=nextjs:nodejs /app/scripts ./scripts
# 从构建器中复制 start.js
COPY --from=builder --chown=nextjs:nodejs /app/start.js ./start.js
COPY --from=builder --chown=nextjs:nodejs /app/start.cjs ./start.cjs
# 从构建器中复制 public 和 .next/static 目录
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
@@ -63,4 +63,4 @@ USER nextjs
EXPOSE 3000
# 使用自定义启动脚本,先预加载配置再启动服务器
CMD ["node", "start.js"]
CMD ["node", "start.cjs"]

View File