retry
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -53,7 +53,7 @@ ENV NODE_ENV=production
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
ENV ENABLE_REACT_COMPILER=false
|
||||
|
||||
RUN dotenv -e .env.local -- pnpm build
|
||||
RUN pnpm build
|
||||
|
||||
# --- Stage 2: Runtime ---
|
||||
FROM node:20-alpine
|
||||
@@ -61,26 +61,15 @@ ARG APP_ENV=production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g pnpm@9
|
||||
|
||||
# Copy package files for dependency installation
|
||||
COPY --from=builder /app/package.json ./
|
||||
COPY --from=builder /app/pnpm-lock.yaml ./
|
||||
COPY --from=builder /app/pnpm-workspace.yaml ./
|
||||
COPY --from=builder /app/packages ./packages
|
||||
COPY --from=builder /app/tooling ./tooling
|
||||
|
||||
# Install production dependencies
|
||||
RUN pnpm install --prod --frozen-lockfile
|
||||
|
||||
# Copy the built Next.js application
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# Copy environment files
|
||||
COPY --from=builder /app ./
|
||||
COPY --from=builder /app/.env.${APP_ENV} .env.production
|
||||
COPY --from=builder /app/.env.local .env.local
|
||||
|
||||
RUN cp ".env.${APP_ENV}" .env.local
|
||||
|
||||
RUN npm install -g pnpm@9 \
|
||||
&& pnpm install --prod --frozen-lockfile
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# 🔍 Optional: Log key envs for debug
|
||||
|
||||
Reference in New Issue
Block a user