From 9f8dcc276b746ba3d3d9365541d88f5423430a3d Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Jun 2024 10:30:43 +0100 Subject: Configures static for the new volume --- conf/settings/prod.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'conf/settings/prod.py') 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" -- cgit v1.2.3