diff --git a/Procfile b/Procfile index e4af295..b348d39 100644 --- a/Procfile +++ b/Procfile @@ -1,4 +1,3 @@ # web: uwsgi --http :$PORT --module=publichealth.wsgi:application --master --offload-threads 3 -# web: gunicorn publichealth.wsgi -b 0.0.0.0:$PORT -w 5 --log-file=- -web: python manage.py runserver $PORT +web: gunicorn publichealth.wsgi:application -b 0.0.0.0:$PORT -w 5 --log-file=- init: python manage.py migrate diff --git a/publichealth/settings/base.py b/publichealth/settings/base.py index f603424..e334513 100644 --- a/publichealth/settings/base.py +++ b/publichealth/settings/base.py @@ -14,6 +14,7 @@ https://docs.djangoproject.com/en/1.8/ref/settings/ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os +import dj_database_url PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(PROJECT_DIR) @@ -95,10 +96,7 @@ WSGI_APPLICATION = 'publichealth.wsgi.application' # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'publichealth', - } + 'default': dj_database_url.config() } @@ -194,4 +192,4 @@ WAGTAIL_SITE_NAME = "Public Health Schweiz" # Puput settings -PUPUT_AS_PLUGIN = True \ No newline at end of file +PUPUT_AS_PLUGIN = True