5 months ago
Hello,
I'm using railway since yesterday and I've installed a Strapi + Postgresql everything was working fine, and the app was deploying strapi nicely when pushed into github.
This morning, I pushed into github and railway start the deployment of my app.
And then, my DB got empty … Like reset even the admin access … It was like restarting to builds the entire app DB.
Am I missing something ? My workflows feed the database during all the night and everything was fine. After Strapi deploy, the volume for postgres looks like reset (empty).
The only update was adding a field on the schema for one content-type.
Any idea ?
Best regards,
Jean-Rémi
5 Replies
5 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
5 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 5 months ago
5 months ago
It seems like your Postgres DB may have been re-initialized during deploy. Can you confirm if it’s set up as a separate Railway service with its own volume, and share the Postgres logs right after the deploy? That’ll help see why the data was lost.
5 months ago
It sounds like your Strapi app isn't connecting to your Postgres service on deployment and is instead creating a temporary database that gets wiped each time. Can you confirm that your production environment variables in Strapi are correctly set up to point to your Railway Postgres instance? That would ensure the data persists between deploys.
5 months ago
This could be because your Strapi app is not properly integrated with Postgres. As it is creating a temporary database and once you restart or refresh all your data will be vanished. Check your Strapi is properly setup with Postgres database. Once your Postgres is properly setup and integrated with Strapi your data will start storing.
5 months ago
Is your DB part of your service (in a singular deployment)?

