summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-06-06 10:30:43 +0100
committerMatthew Lemon <y@yulqen.org>2024-06-06 10:30:43 +0100
commit9f8dcc276b746ba3d3d9365541d88f5423430a3d (patch)
treec1e6fef936382632eda67bfe13e6fb611a336e74 /conf
parente487ca089ecb3f8ca946f229f5a2058058e401dc (diff)
Configures static for the new volume
Diffstat (limited to 'conf')
-rw-r--r--conf/settings/prod.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/conf/settings/prod.py b/conf/settings/prod.py
index f6b2d77..cb1842a 100644
--- a/conf/settings/prod.py
+++ b/conf/settings/prod.py
@@ -2,9 +2,6 @@ import os
from .base import *
-# Database
-# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
-
# Check if running in OpenShift cluster
if os.path.exists("/etc/secret-volume"):
# Read database credentials from mounted Secret volume
@@ -33,3 +30,8 @@ DATABASES = {
"PORT": db_port,
}
}
+
+if os.getenv("STATIC_ROOT"):
+ STATIC_ROOT = os.getenv("STATIC_ROOT")
+else:
+ STATIC_ROOT = "/data/static"