mirror of
https://git.victorphan.net/basketballcantho/ten-project.git
synced 2026-08-05 09:53:10 +07:00
sửa lai docker compose
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user