deploy: copy the file again for the last stage
Pedro Lucas Porcellis porcellis@eletrotupi.com · 4 months ago
6559a0099488c15b1f5cc555dbe1d449fde013db Browse filesParents
d514519Changed files
1
Additions
+1
Deletions
0
api/Dockerfile.production
1 1
# Build stage
2 2
FROM node:24-alpine3.23 AS builder
3 3
4 4
RUN apk add --no-cache build-base yaml-dev
5 5
41 41
COPY --from=builder --chown=${UID}:${GID} /app/node_modules/.prisma ./node_modules/.prisma
42 42
43 43
# Compiled output and prisma schema (needed for migrate deploy)
44 44
COPY --from=builder --chown=${UID}:${GID} /app/dist ./dist
45 45
COPY --chown=${UID}:${GID} prisma ./prisma/
46 +
COPY --chown=${UID}:${GID} prisma.config.ts ./
46 47
47 48
EXPOSE 3000
48 49
49 50
# migrate then start
50 51
CMD ["sh", "-c", "npx prisma migrate deploy && npm run prod"]