Db config
This commit is contained in:
parent
c64612bdba
commit
f48aaabf09
2 changed files with 4 additions and 7 deletions
3
Procfile
3
Procfile
|
@ -1,4 +1,3 @@
|
||||||
# web: uwsgi --http :$PORT --module=publichealth.wsgi:application --master --offload-threads 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: gunicorn publichealth.wsgi:application -b 0.0.0.0:$PORT -w 5 --log-file=-
|
||||||
web: python manage.py runserver $PORT
|
|
||||||
init: python manage.py migrate
|
init: python manage.py migrate
|
||||||
|
|
|
@ -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, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
import os
|
import os
|
||||||
|
import dj_database_url
|
||||||
|
|
||||||
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
BASE_DIR = os.path.dirname(PROJECT_DIR)
|
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
|
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': dj_database_url.config()
|
||||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
||||||
'NAME': 'publichealth',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue