3028bde671
Removes standalone build to allow prisma CLI to run migrations at startup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
598 B
Docker
25 lines
598 B
Docker
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npx prisma generate
|
|
RUN npm run build
|
|
|
|
FROM node:20-alpine AS runner
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
|
|
COPY --from=builder /app/package*.json ./
|
|
COPY --from=builder /app/.next ./.next
|
|
COPY --from=builder /app/prisma ./prisma
|
|
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/entrypoint.sh ./entrypoint.sh
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
EXPOSE 3000
|
|
CMD ["sh", "entrypoint.sh"]
|