diff --git a/Procfile b/Procfile index 25b71ea..421bdf4 100644 --- a/Procfile +++ b/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 diff --git a/app.json b/app.json index 397a426..526b4e4 100644 --- a/app.json +++ b/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" } } } diff --git a/webhook_logger/settings.py b/webhook_logger/settings.py index b3cd4ff..eca02cd 100644 --- a/webhook_logger/settings.py +++ b/webhook_logger/settings.py @@ -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")]