refactor(settings): replace DATABASE_URL with explicit DB env vars
Replace the single `DATABASE_URL` connection string with individual environment variables (`APP_DB_NAME`, `APP_DB_USER`, `APP_DB_PASSWORD`, `DB_HOST`, `DB_PORT`) for more granular database configuration control.
This commit is contained in:
@@ -11,7 +11,11 @@ ALLOWED_HOSTS=localhost,127.0.0.1,mnemosyne.ouranos.helu.ca
|
||||
CSRF_TRUSTED_ORIGINS=http://localhost:8000,https://mnemosyne.ouranos.helu.ca
|
||||
|
||||
# --- PostgreSQL Database ---
|
||||
DATABASE_URL=postgres://mnemosyne:password@portia.incus:5432/mnemosyne
|
||||
APP_DB_NAME=mnemosyne
|
||||
APP_DB_USER=mnemosyne
|
||||
APP_DB_PASSWORD=password
|
||||
DB_HOST=portia.incus
|
||||
DB_PORT=5432
|
||||
|
||||
# --- Neo4j Graph Database ---
|
||||
NEOMODEL_NEO4J_BOLT_URL=bolt://neo4j:password@ariel.incus:25554
|
||||
@@ -98,10 +98,14 @@ WSGI_APPLICATION = "mnemosyne.wsgi.application"
|
||||
|
||||
# --- Database: PostgreSQL (Django ORM) ---
|
||||
DATABASES = {
|
||||
"default": env.db(
|
||||
"DATABASE_URL",
|
||||
default="postgres://mnemosyne:password@portia.incus:5432/mnemosyne",
|
||||
),
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": env("APP_DB_NAME", default="mnemosyne"),
|
||||
"USER": env("APP_DB_USER", default="mnemosyne"),
|
||||
"PASSWORD": env("APP_DB_PASSWORD", default="password"),
|
||||
"HOST": env("DB_HOST", default="portia.incus"),
|
||||
"PORT": env("DB_PORT", default="5432"),
|
||||
}
|
||||
}
|
||||
|
||||
# --- Neo4j Graph Database ---
|
||||
|
||||
Reference in New Issue
Block a user