- Remove standalone output mode from Next.js config - Use single-stage Docker build with npm start - Eliminate complex multi-stage build that was causing issues
21 lines
330 B
Docker
21 lines
330 B
Docker
FROM node:20-slim
|
|
|
|
RUN apt-get update && apt-get install -y openssl ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npx prisma generate
|
|
RUN npm run build
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV AUTH_TRUST_HOST=true
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["npm", "start"]
|