fix: [FL-126] 修复 Next.js standalone 模式下 server.js 路径问题
- 在 workspace 环境下,standalone 输出的 server.js 位于 web/ 子目录 - 修改 CMD 为 node web/server.js - 调整 public 和 static 文件的复制路径以匹配 standalone 结构 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+3
-3
@@ -34,11 +34,11 @@ ENV NEXT_PUBLIC_APP_BASE_PATH=${NEXT_PUBLIC_APP_BASE_PATH}
|
||||
RUN groupadd --system --gid 1001 nodejs && \
|
||||
useradd --system --uid 1001 --gid nodejs nextjs
|
||||
|
||||
COPY --from=builder /app/web/public ./public
|
||||
COPY --from=builder /app/web/public ./web/public
|
||||
COPY --from=builder /app/web/.next/standalone ./
|
||||
COPY --from=builder /app/web/.next/static ./.next/static
|
||||
COPY --from=builder /app/web/.next/static ./web/.next/static
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "web/server.js"]
|
||||
|
||||
Reference in New Issue
Block a user