Add environ_settings.py for situations where you want to configure GetTogether using runtime variables (such as docker, vagrant or other container style deployments). Fixes #12

This commit is contained in:
Michael Hall 2018-01-12 22:46:59 -05:00
parent 9e26c86f3c
commit f021893dd3
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# Use environment variables to configure settings
import os
from get_together.settings import *
DEBUG=os.environ.get('DEBUG_MODE', False)=="True"
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '127.0.0.1').split(',')
SECRET_KEY=os.environ.get('SECRET_KEY', '')
# Database configs
import dj_database_url
DATABASES['default'].update(dj_database_url.config())
MEDIA_URL = os.environ.get('MEDIA_URL', '/media/')
STATIC_URL = os.environ.get('STATIC_URL', '/static/')

View file

@ -15,3 +15,4 @@ six==1.11.0
social-auth-app-django==2.1.0
social-auth-core==1.6.0
urllib3==1.22
dj-database-url==0.4.2