mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
Add environment variable to include Sub-Path in resolve.js.
This commit is contained in:
@@ -35,6 +35,7 @@ docker-compose:
|
||||
environment:
|
||||
# all the other env
|
||||
- SCRIPT_NAME=/<sub path>
|
||||
- JS_REVERSE_SCRIPT_PREFIX=/<sub path>/
|
||||
- STATIC_URL=/<www path>/static/
|
||||
- MEDIA_URL=/<www path>/media/
|
||||
labels:
|
||||
@@ -56,4 +57,4 @@ apache:
|
||||
|
||||
I used two paths `<sub path>` and `<www path>` for simplicity. In my case I have `<sub path> = recipes` and `<www path> = 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.
|
||||
I left out the TLS config in this example for simplicty.
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user