Django deployment: reference sqlite on disk

I am trying to deploy my Django app with SQLITE and the file saved on disk.

Mount Path
/opt/render/project/src/mydisk

settings.php
DATABASES = {
“default”: {
“ENGINE”: “django.db.backends.sqlite3”,
“NAME”: BASE_DIR / “mydisk/db.sqlite3”,
}
}

project files
/myfiles
/django_project
settings.php
/app1
/static
/templates

manage.py

Django deploys but when I try to go to a page that needs db access, then I get a 500 server error.
On local everything works fine.

I dont know what I am missing here. Appreciate any help. Thx

Hi there,

For a SQLite database to work as expected, it needs to be written to a persistent disk: https://render.com/docs/disks

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.