sửa lai docker compose

This commit is contained in:
2026-04-02 10:21:52 +07:00
parent cde39872b4
commit 088b03c36f
3 changed files with 18 additions and 5 deletions
+4 -1
View File
@@ -16,7 +16,7 @@ COPY . .
ARG NEXT_PUBLIC_API_URL=http://backend:8000
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
RUN npm run build
RUN mkdir -p /app/public && npm run build
# ── Stage 3: runtime ──────────────────────────────────────────────────────────
FROM node:20-alpine AS runtime
@@ -24,6 +24,9 @@ FROM node:20-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
# public/ may not exist in projects that don't use it — create it to be safe
RUN mkdir -p .next/static public
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static