Apply Prisma migrations on startup
All checks were successful
Build and deploy Backend / build (push) Successful in 3m28s

This commit is contained in:
Ruslan Bakiev
2026-05-08 16:01:00 +07:00
parent 7ca503667f
commit bba9c98c82
2 changed files with 42 additions and 2 deletions

View File

@@ -15,10 +15,10 @@ FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --omit=dev
RUN npm ci
COPY --from=build /app/dist ./dist
COPY --from=build /app/src/generated ./dist/generated
COPY --from=build /app/prisma ./prisma
COPY --from=build /app/prisma.config.ts ./prisma.config.ts
EXPOSE 4000
CMD ["npm", "run", "start"]
CMD ["sh", "-c", "npm run prisma:migrate:deploy && npm run start"]