Data get's deleted when strapi container restarts

Does anyone got this issue solved?

@Eventyret Facing same issue my database in postgress is hosted in aws and m not using socker at all yesterday the data was perfect but next day i see that all the data base got vanished only tables are there like only skeleton of data but not the data

@Eventyret I’am facing the same Issue, I deployed strapi inside gke cluster with one pod inside my deployment and a postgres running inside the cluster. Even when configuring the settings that @twofingerrightclick mentioned, i have the same Problem. Always when a new pod is comming up, the tables inside my psql database gets deleted.

Hi, Eventyret.

Can you elaborate? Why data is removed even though the files are mounted into the container?

Also, why do you say that SQLite is only for development? Why is it not good for production, for a small, simple site?


If a file is mounted to the host system it’s stored on the system and not just in the container.
SQLITE in a dev container will cause problems as it’s normally not mounted, meaning you stop the container or redeploy the container and it will delete it.