diff --git a/docs/install/other.md b/docs/install/other.md index 45b50a319..1221b2094 100644 --- a/docs/install/other.md +++ b/docs/install/other.md @@ -35,6 +35,7 @@ docker-compose: environment: # all the other env - SCRIPT_NAME=/ + - JS_REVERSE_SCRIPT_PREFIX=// - STATIC_URL=//static/ - MEDIA_URL=//media/ labels: @@ -56,4 +57,4 @@ apache: I used two paths `` and `` for simplicity. In my case I have ` = recipes` and ` = serve/recipes`. One could also change the matching rules of traefik to have everything under one path. -I left out the TLS config in this example for simplicty. \ No newline at end of file +I left out the TLS config in this example for simplicty. diff --git a/recipes/settings.py b/recipes/settings.py index 3105c67f1..8e39a3b47 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -228,6 +228,8 @@ LANGUAGES = [ # path for django_js_reverse to generate the javascript file containing all urls. Only done because the default command (collectstatic_js_reverse) fails to update the manifest JS_REVERSE_OUTPUT_PATH = os.path.join(BASE_DIR, "cookbook/static/django_js_reverse") +JS_REVERSE_SCRIPT_PREFIX = os.getenv('JS_REVERSE_SCRIPT_PREFIX', '') + STATIC_URL = os.getenv('STATIC_URL', '/static/') STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")