Persistent Disk with sqlite and Strapi not working

Hello,

I deployed a Web Service with Strapi and attached a persistent disk:

I also set 2 env vars to use sqlite on my persistent disk:

DATABASE_CLIENT = sqlite
DATABASE_FILENAME = /var/data/strapi.db

During the deployment I can see that Strapi is using the following DB:
/opt/render/project/src/var/data/strapi.db

However after each deployment of my Web Service, I lose all my data.

Am I missing something in my configuration? or is it something else?

Thanks a lot for your help

Hi,

The disk mount path is an “absolute path”, it is not relative to your code, which on a Render Native Runtime is stored under /opt/render/project/src.

The mount path you shared is just /var/data, so the full disk path to the SQLite file should be /var/data/strapi.db.

That was it, thanks a lot :wink: