From a4621f0c7e9167ced94a2352e6a9e48faeba6057 Mon Sep 17 00:00:00 2001 From: Lova ANDRIARIMALALA <43842786+Xpirix@users.noreply.github.com> Date: Wed, 31 Jan 2024 18:11:07 +0300 Subject: [PATCH] Get static and media root from the environments (#347) --- qgis-app/settings_docker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qgis-app/settings_docker.py b/qgis-app/settings_docker.py index 05d109c3..bb151b7f 100644 --- a/qgis-app/settings_docker.py +++ b/qgis-app/settings_docker.py @@ -12,7 +12,7 @@ # Absolute filesystem path to the directory that will hold user-uploaded files. # Example: "/var/www/example.com/media/" -MEDIA_ROOT = "/home/web/media/" +MEDIA_ROOT = os.environ.get("MEDIA_ROOT", "/home/web/media") # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash. @@ -25,7 +25,7 @@ # Don't put anything in this directory yourself; store your static files # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/var/www/example.com/static/" -STATIC_ROOT = "/home/web/static" +STATIC_ROOT = os.environ.get("STATIC_ROOT", "/home/web/static") # URL prefix for static files. # Example: "http://example.com/static/", "http://static.example.com/"