Hello
I deployed a CMS backend service on render using sqlite3 but for some reason the content data saved on Strapi backend clears out on every deployment.
Also tried the use of a persistent disk storage, and updated the āDATABASE_FILENAMEā in the environment variables but itās still clears out db on every deploy
Clearing out the content data on every deployment sounds like data is not being saved on the persistent disk.
For your specific service, please double check for the leading / in DATABASE_FILENAME environment variable value. I think your applicationās database file is not the same as the persistent diskās location (which has a leading /).
On my service, I have a DATABASE_FILENAME with a value of /data/strapi.db and a persistent disk with a mount path. /data.
With this setup, the content still clears out on every deployment. Also with the example repo shared, I have a similar setup of strapi with my existing repo code.
I recommend looking through your applicationās directories in the Shell tab to determine where your application is saving its SQLite database file. Can you confirm that the file is persisted inside the /data directory at /data/strapi.db? If not, where is the database file being saved and what is controlling the SQLite database configuration? Itās possible that your application is not respecting the DATABASE_FILENAME environment variable.
Only changes to files in the persistent disk (mounted at /data) will persist across deployments.