move some settings to environment variables

This commit is contained in:
Andreas Zweili 2019-08-10 16:50:35 +02:00
parent d8b09fd735
commit b9efd4ed60
2 changed files with 5 additions and 4 deletions

View File

@ -19,6 +19,8 @@ services:
ports:
- "8000:8000"
environment:
- DEBUG=False
- DJANGO_SETTINGS_MODULE=network_inventory.settings.docker
- SECRET_KEY=developemenet_key
depends_on:
- db

View File

@ -5,11 +5,10 @@ ALLOWED_HOSTS = [
'127.0.0.1',
]
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'development_key'
DEBUG = os.environ.get('DEBUG')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY')
DATABASES = {
'default': {