Mode production utilise désormais postgreSQL comme base de données
This commit is contained in:
parent
00d34f819d
commit
d43af2278e
@ -15,8 +15,20 @@ ALLOWED_HOSTS = [os.getenv('ALLOWED_HOSTS', '*')]
|
|||||||
# `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
|
# `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
|
||||||
USE_X_FORWARDED_HOST = True
|
USE_X_FORWARDED_HOST = True
|
||||||
|
|
||||||
# CORS: allow all site to make cross site requests
|
# CORS: allow all site to make cross site requests
|
||||||
CORS_ORIGIN_ALLOW_ALL = True
|
CORS_ORIGIN_ALLOW_ALL = True
|
||||||
|
|
||||||
# CORS: limit to API only
|
# CORS: limit to API only
|
||||||
CORS_URLS_REGEX = r'^/api/.*$'
|
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'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user