OnlineJudge/oj/production_settings.py

24 lines
539 B
Python
Raw Permalink Normal View History

2018-01-04 03:42:20 +00:00
from utils.shortcuts import get_env
2017-10-23 02:47:26 +00:00
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
2017-11-24 19:37:40 +00:00
'HOST': get_env("POSTGRES_HOST", "oj-postgres"),
'PORT': get_env("POSTGRES_PORT", "5432"),
2017-10-23 12:59:44 +00:00
'NAME': get_env("POSTGRES_DB"),
'USER': get_env("POSTGRES_USER"),
'PASSWORD': get_env("POSTGRES_PASSWORD")
2017-10-23 02:47:26 +00:00
}
}
REDIS_CONF = {
2017-11-24 19:37:40 +00:00
"host": get_env("REDIS_HOST", "oj-redis"),
2017-10-23 02:47:26 +00:00
"port": get_env("REDIS_PORT", "6379")
}
DEBUG = False
ALLOWED_HOSTS = ['*']
2017-11-24 19:37:40 +00:00
DATA_DIR = "/data"