Skip to content

Signup issues on prod #474

Closed Answered by kiliman
arpitdalal asked this question in Q&A
Oct 5, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

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 the seed.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

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kentcdodds
Comment options

@arpitdalal
Comment options

@kentcdodds
Comment options

Answer selected by arpitdalal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants