fix: resolve failed mustChangePassword migration on startup

This commit is contained in:
kevin-asprec
2026-05-04 18:32:00 +08:00
parent 40f30b4a5d
commit a66fff68de

View File

@@ -34,4 +34,4 @@ COPY --from=builder /app/packages/db/src ./packages/db/src
ENV NODE_ENV=production
EXPOSE 3001
ENTRYPOINT ["dumb-init", "--"]
CMD ["sh", "-c", "cd packages/db && npx prisma migrate deploy && if [ \"$RUN_SEED\" = \"true\" ]; then echo 'Seeding database...' && npx tsx prisma/seed.ts; fi && cd /app && node dist/main"]
CMD ["sh", "-c", "cd packages/db && npx prisma migrate resolve --rolled-back 20260504100000_add_user_must_change_password 2>/dev/null; npx prisma migrate deploy && if [ \"$RUN_SEED\" = \"true\" ]; then echo 'Seeding database...' && npx tsx prisma/seed.ts; fi && cd /app && node dist/main"]