Mode production utilise désormais postgreSQL comme base de données

This commit is contained in:
Olivier DOSSMANN 2018-01-26 08:24:39 +01:00
parent 00d34f819d
commit d43af2278e

View File

@ -15,8 +15,20 @@ ALLOWED_HOSTS = [os.getenv('ALLOWED_HOSTS', '*')]
# `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
USE_X_FORWARDED_HOST = True
# CORS: allow all site to make cross site requests
CORS_ORIGIN_ALLOW_ALL = True
# CORS: allow all site to make cross site requests
CORS_ORIGIN_ALLOW_ALL = True
# CORS: limit to API only
CORS_URLS_REGEX = r'^/api/.*$'
# WARNING: you need to install psycopg2 with pip
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.getenv('POSTGRES_DB', 'postgres'),
'USER': os.getenv('POSTGRES_USER', 'postgres'),
'PASSWORD': os.getenv('POSTGRES_PASS', 'postgres'),
'HOST': os.getenv('POSTGRES_HOST', '127.0.0.1'),
'PORT': os.getenv('POSTGRES_PORT', '5432'),
}
}