Add local-first SPA architecture and containerized production deploy.
Move data access to use-cases and IndexedDB repositories with optional remote fallback, changelog/sync ports, and encrypted local backup. Add production Docker Compose (nginx frontend + optional backend) and Apache host proxy configuration for deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
SECRET_KEY = 'django-insecure-social-graph-dev-key-change-in-production'
|
||||
DEBUG = True
|
||||
ALLOWED_HOSTS = ['*']
|
||||
SECRET_KEY = os.environ.get(
|
||||
'SECRET_KEY',
|
||||
'django-insecure-social-graph-dev-key-change-in-production',
|
||||
)
|
||||
DEBUG = os.environ.get('DEBUG', 'True').lower() in ('1', 'true', 'yes')
|
||||
ALLOWED_HOSTS = [
|
||||
h.strip() for h in os.environ.get('ALLOWED_HOSTS', '*').split(',') if h.strip()
|
||||
]
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.contenttypes',
|
||||
@@ -25,7 +31,7 @@ ROOT_URLCONF = 'config.urls'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
'NAME': os.environ.get('DATABASE_PATH', str(BASE_DIR / 'db.sqlite3')),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user