Skip to content

Commit

Permalink
fix: Make Django's variable DEBUG to be false in docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lfjnascimento committed Jul 24, 2024
1 parent 777bc55 commit 796fa45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/kernelCI/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_json_env_var(name, default):
try:
return json.loads(var)
except json.JSONDecodeError:
if isinstance(default, str):
if isinstance(default, str) or isinstance(default, bool):
return var
raise

Expand All @@ -38,7 +38,7 @@ def get_json_env_var(name, default):
SECRET_KEY = "django-insecure--!70an0r@i00)oqf!3uq_)9dx2^%)xs+(ade0aie+l#6*rh-%#"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = get_json_env_var('DEBUG', True)

ALLOWED_HOSTS = get_json_env_var(
'ALLOWED_HOSTS',
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ services:
- DB_DEFAULT_PASSWORD_FILE=/run/secrets/postgres_password_secret
- DB_DEFAULT_HOST=cloudsql-proxy
- DB_DEFAULT_USER=${DB_DEFAULT_USER:-kernelci}
- DEBUG=False

dashboard:
build: ./dashboard
Expand Down

0 comments on commit 796fa45

Please sign in to comment.