diff --git a/collection/collection/environments/production.py b/collection/collection/environments/production.py index 97fa3db..ceb3716 100644 --- a/collection/collection/environments/production.py +++ b/collection/collection/environments/production.py @@ -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'), + } +}