feat: add RUN_SEED support and nullable tenantId migration
- New migration: make users.tenantId nullable for super_admin - Dockerfile: RUN_SEED=true env var triggers seed after migrations - Seed uses npx tsx (available in node_modules)
This commit is contained in:
@@ -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 && cd /app && node dist/main"]
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user