Skip to content

Commit fa16154

Browse files
committed
Merge pull request #25 from dansondergaard/no-debug-in-production
Only enable debug mode in development.
2 parents 4980d20 + 09ae3f4 commit fa16154

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ web:
1010
- /usr/src/app
1111
- /usr/src/app/static
1212
env_file: .env
13+
environment:
14+
DEBUG: 'true'
1315
command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000
1416

1517
nginx:

web/docker_django/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
SECRET_KEY = os.environ['SECRET_KEY']
2424

2525
# SECURITY WARNING: don't run with debug turned on in production!
26-
DEBUG = True
26+
DEBUG = True if os.getenv('DEBUG') == 'true' else False
2727

2828
ALLOWED_HOSTS = []
2929

0 commit comments

Comments
 (0)