Seeding production DB with Next.js standalone build (no Payload CLI available) #16362
Unanswered
tariwiencke
asked this question in
Q&A
Replies: 1 comment
-
|
Running the script with node_env production did the trick for me. NODE_ENV=production pnpm run seed-images But I wonder what would happen if I accidentally run payload in development mode on the production server. There must be a cleaner way. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to seed the production database with some data like brands, categories. I do this directly from the terminal and not from within the docker container since it is in standalone output and does not have the payload executable.
The seeding works but now the production container opens this interactive prompt:
? It looks like you've run Payload in dev mode, meaning you've dynamically pushed changes to your database.So I can't do it from the shell nor from within the docker container. What options do I have?
Here is my payload config:
Here is the package.json script:
Here is the seeding function:
Here is my Dockerfile:
Here is my docker-compose:
Beta Was this translation helpful? Give feedback.
All reactions