Strapi postgre database resets after re-deploying

arashtajdarHOBBY

8 months ago

the database resets to default tables and all the data lost after each deployment.

I start strapi in develop mode to be able to create the tables, then I change it into production and everything is lost.

Solved

4 Replies

7 months ago

Per Strapi's docs this is not how Strapi is to be used - https://docs.strapi.io/dev-docs/faq#why-cant-i-create-or-update-content-types-in-productionstaging

You should only ever run Strapi in development mode locally.


arashtajdarHOBBY

7 months ago

Thanks for the reply but I don't find anything in this doc about running it on staging mode to be able to create content.
with "strapi start" command or if I leave the field empty, it will be in production mode and i'm not able to create content.


7 months ago

  1. Run Strapi in development mode locally, make the changes, add content, etc.

  2. Run Strapi in production mode when on Railway, consume the content, etc.


arashtajdarHOBBY

7 months ago

Thanks a lot. I will try

UPDATE:

it worked.


Status changed to Solved brody 8 months ago