Add Docker support with Gunicorn, SQLite volume persistence, and optional PostgreSQL

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Shayan Azadi
2026-07-01 00:32:25 +03:30
parent 066276743a
commit 5dd29c41d6
8 changed files with 151 additions and 3 deletions

View File

@@ -71,12 +71,17 @@ if DATABASE_URL:
}
}
else:
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3'}}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': config('SQLITE_PATH', default=str(BASE_DIR / 'db.sqlite3')),
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'NAME': config('SQLITE_PATH', default=str(BASE_DIR / 'db.sqlite3')),
}
}