added a new environment to the settings
This commit is contained in:
parent
dce86535bd
commit
0ec7871268
2
Procfile
2
Procfile
|
@ -1 +1 @@
|
|||
web: daphne -p $PORT webhook_logger.asgi:application
|
||||
web: daphne -b 0.0.0.0 -p $PORT webhook_logger.asgi:application -v2
|
||||
|
|
4
app.json
4
app.json
|
@ -8,6 +8,10 @@
|
|||
"SECRET_KEY": {
|
||||
"description": "Django Secret key settings",
|
||||
"generator": "secret"
|
||||
},
|
||||
"APP_ENV": {
|
||||
"description": "Environment the app runs in",
|
||||
"value": "heroku"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,9 @@ APP_ENV = os.environ.get("ENVIRONMENT", "development")
|
|||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
if APP_ENV == "development":
|
||||
DEBUG = True
|
||||
elif APP_ENV == "heroku":
|
||||
DEBUG = False
|
||||
ALLOWED_HOSTS = [".herokuapp.com"]
|
||||
else:
|
||||
DEBUG = False
|
||||
ALLOWED_HOSTS = [os.environ.get("DOMAIN")]
|
||||
|
|
Loading…
Reference in New Issue