From 0221ce612a1c8069ff98f9e6b6a7ee52bf52feb6 Mon Sep 17 00:00:00 2001 From: Michael Derynck Date: Mon, 15 Aug 2022 12:08:53 -0600 Subject: [PATCH] Make STATIC_URL configurable from env --- engine/settings/base.py | 2 +- engine/settings/prod_without_db.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/settings/base.py b/engine/settings/base.py index 578f0591..89cafb47 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -238,7 +238,7 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.1/howto/static-files/ -STATIC_URL = "/static/" +STATIC_URL = os.environ.get("STATIC_URL", "/static/") STATIC_ROOT = "./static/" CELERY_BROKER_URL = "amqp://rabbitmq:rabbitmq@localhost:5672" diff --git a/engine/settings/prod_without_db.py b/engine/settings/prod_without_db.py index 5b8a83b4..ed73daed 100644 --- a/engine/settings/prod_without_db.py +++ b/engine/settings/prod_without_db.py @@ -53,7 +53,6 @@ STATICFILES_DIRS = [ "/etc/app/static", ] STATIC_ROOT = "./collected_static/" -STATIC_URL = "/static/" DEBUG = False