Dockerfile créé avec mode production et mode développement
This commit is contained in:
18
collection/collection/production.py
Normal file
18
collection/collection/production.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""
|
||||
Django production settings
|
||||
"""
|
||||
import os
|
||||
from collection.settings import * # NOQA
|
||||
|
||||
DEBUG = os.getenv('DEBUG', False)
|
||||
|
||||
SECRET_KEY = os.getenv('SECRET_KEY')
|
||||
|
||||
ALLOWED_HOSTS = [os.getenv('ALLOWED_HOSTS', '*')]
|
||||
|
||||
# Domain configuration:
|
||||
# - if you have a specific domain to secure, change ALLOWED_HOSTS like this:
|
||||
# ALLOWED_HOSTS = ['domain.tld', 'domain.tld.']
|
||||
# - if you use a proxy like Nginx, you need to add this line into config:
|
||||
# `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;`
|
||||
USE_X_FORWARDED_HOST = True
|
@ -111,12 +111,15 @@ TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
USE_L10N = False
|
||||
|
||||
USE_TZ = True
|
||||
USE_TZ = False
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(os.path.abspath(os.path.curdir), 'static')
|
||||
if not os.getenv('STATIC_ROOT', None):
|
||||
STATIC_ROOT = os.path.abspath(os.getenv('STATIC_ROOT'))
|
||||
|
Reference in New Issue
Block a user