Signup issues on prod #474
-
I've deployed the app on fly following the steps mentioned in the deployment documentation. But signing up gives me this error in the logs:
This error is logged after hitting submit on the onboarding page but this playwright test did pass in GH actions but this isn't working on prod for some reason 🤷♂️ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
playwright tests work because the DB is seeded |
Beta Was this translation helpful? Give feedback.
-
Did you follow the instructions from the "Seeding Production" section of the Deployment documents? https://github.com/epicweb-dev/epic-stack/blob/main/docs/deployment.md#seeding-production By default, the Dockerfile will generate a blank database. You'll need to either seed it with ADD prisma .
RUN npx prisma generate
RUN npx prisma seed You can either use |
Beta Was this translation helpful? Give feedback.
Did you follow the instructions from the "Seeding Production" section of the Deployment documents?
https://github.com/epicweb-dev/epic-stack/blob/main/docs/deployment.md#seeding-production
By default, the Dockerfile will generate a blank database. You'll need to either seed it with
sqlite3
cli, or you can update theseed.ts
file to handle production seeding. Make sure your script checks to see if the database has already been seeded. Update your Dockerfile:ADD prisma . RUN npx prisma generate RUN npx prisma seed
You can either use
process.env.NODE_ENV
or pass values to your script:https://www.prisma.io/docs/guides/migrate/seed-database#user-defined-arguments