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: ports:
- "8000:8000" - "8000:8000"
environment: environment:
- DEBUG=False
- DJANGO_SETTINGS_MODULE=network_inventory.settings.docker - DJANGO_SETTINGS_MODULE=network_inventory.settings.docker
- SECRET_KEY=developemenet_key
depends_on: depends_on:
- db - db

View File

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