Skip to content

Commit

Permalink
ci: Add subpath support
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Feb 6, 2024
1 parent 7c44eb4 commit dffc652
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
AML_CORS_ORIGIN_WHITELIST: ${{ vars.AML_CORS_ORIGIN_WHITELIST }}
AML_DEBUG: ${{ vars.AML_DEBUG }}
AML_LOCATION_PROVIDER: ${{ vars.AML_LOCATION_PROVIDER }}
AML_SUBPATH: ${{ vars.AML_SUBPATH }}
DJANGO_SETTINGS_MODULE: ${{ vars.DJANGO_SETTINGS_MODULE }}
SQL_DATABASE: ${{ vars.SQL_DATABASE }}
SQL_HOST: ${{ vars.SQL_HOST }}
Expand Down
6 changes: 5 additions & 1 deletion backend/aml/production_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases

STATIC_URL = '/django_static/'
# Make sure Django runs on subpath /server
FORCE_SCRIPT_NAME = '/server'
STATIC_URL = FORCE_SCRIPT_NAME + STATIC_URL
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

DATABASES = {
'default': {
Expand Down
1 change: 1 addition & 0 deletions docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ services:
- AML_CORS_ORIGIN_WHITELIST=${AML_CORS_ORIGIN_WHITELIST}
- AML_LOCATION_PROVIDER=${AML_LOCATION_PROVIDER}
- AML_SECRET_KEY=${AML_SECRET_KEY}
- AML_SUBPATH=${AML_SUBPATH}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
Expand Down

0 comments on commit dffc652

Please sign in to comment.