Skip to content

Commit

Permalink
Add support for APPLICATION_ROOT in Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste Jonglez committed Jul 14, 2023
1 parent 5492e9e commit 2c09e56
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ENV DEBUG="False" \
SHOW_ADMIN_EMAIL="True" \
SQLALCHEMY_DATABASE_URI="sqlite:////database/ihatemoney.db" \
SQLALCHEMY_TRACK_MODIFICATIONS="False" \
APPLICATION_ROOT="/" \
ENABLE_CAPTCHA="False" \
LEGAL_LINK=""

Expand Down
1 change: 1 addition & 0 deletions conf/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ SHOW_ADMIN_EMAIL = $SHOW_ADMIN_EMAIL
SQLACHEMY_DEBUG = DEBUG
SQLALCHEMY_DATABASE_URI = "$SQLALCHEMY_DATABASE_URI"
SQLALCHEMY_TRACK_MODIFICATIONS = $SQLALCHEMY_TRACK_MODIFICATIONS
APPLICATION_ROOT = "$APPLICATION_ROOT"
ENABLE_CAPTCHA = $ENABLE_CAPTCHA
LEGAL_LINK = "$LEGAL_LINK"
EOF
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
- SHOW_ADMIN_EMAIL=True
- SQLALCHEMY_DATABASE_URI=sqlite:////database/ihatemoney.db
- SQLALCHEMY_TRACK_MODIFICATIONS=False
- APPLICATION_ROOT=/
- ENABLE_CAPTCHA=False
- LEGAL_LINK=
- PORT=8000
Expand Down
7 changes: 5 additions & 2 deletions ihatemoney/conf-templates/ihatemoney.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,14 @@ ACTIVATE_ADMIN_DASHBOARD = False
# service over plain HTTP.
SESSION_COOKIE_SECURE = True

# Set this to a URL path under which the application will be served. Defaults to "/"
APPLICATION_ROOT = "/"

# You can activate an optional CAPTCHA if you want to. It can be helpful
# to filter spammer bots.
# ENABLE_CAPTCHA = True
ENABLE_CAPTCHA = False

# You may want to point to a special legal page, for instance to give information
# about GDPR, or how you handle the data of your users.
# Set this variable to the URL you want.
# LEGAL_LINK = ""
LEGAL_LINK = ""
7 changes: 4 additions & 3 deletions ihatemoney/default_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
MAIL_DEFAULT_SENDER = "Budget manager <admin@example.com>"
SHOW_ADMIN_EMAIL = True
ACTIVATE_DEMO_PROJECT = True
ACTIVATE_ADMIN_DASHBOARD = False
ADMIN_PASSWORD = ""
ALLOW_PUBLIC_PROJECT_CREATION = True
ACTIVATE_ADMIN_DASHBOARD = False
SESSION_COOKIE_SECURE = True
APPLICATION_ROOT = "/"
ENABLE_CAPTCHA = False
LEGAL_LINK = ""
SUPPORTED_LANGUAGES = [
"ca",
"cs",
Expand Down Expand Up @@ -43,5 +46,3 @@
"uk",
"zh_Hans",
]
ENABLE_CAPTCHA = False
LEGAL_LINK = ""

0 comments on commit 2c09e56

Please sign in to comment.