gault-millau/project/settings/production.py
Dmitriy Kuzmenko 6422fc09f9 elc
2019-11-04 16:20:10 +03:00

67 lines
1.7 KiB
Python

"""Production settings."""
from .base import *
from .amazon_s3 import *
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
ALLOWED_HOSTS = ['*.next.gaultmillau.com', 'api.gaultmillau.com']
CSRF_TRUSTED_ORIGINS = ['.next.gaultmillau.com', ]
SEND_SMS = False
SMS_CODE_SHOW = True
USE_CELERY = True
SCHEMA_URI = 'http'
DEFAULT_SUBDOMAIN = 'www'
SITE_DOMAIN_URI = 'gaultmillau.com'
DOMAIN_URI = 'next.gaultmillau.com'
# ELASTICSEARCH SETTINGS
ELASTICSEARCH_DSL = {
'default': {
'hosts': 'elasticsearch:9200'
}
}
ELASTICSEARCH_INDEX_NAMES = {
'search_indexes.documents.news': 'development_news', # temporarily disabled
'search_indexes.documents.establishment': 'development_establishment',
}
sentry_sdk.init(
dsn="https://35d9bb789677410ab84a822831c6314f@sentry.io/1729093",
integrations=[DjangoIntegration()]
)
# TMP ( TODO remove it later)
# Временный хардкод для демонстрации 4 ноября, потом удалить!
HARDCODED_INTERNATIONAL_NEWS_IDS = [8, 9, 10, 11, 15, 17]
# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': os.environ.get('DB_NAME'),
'USER': os.environ.get('DB_USERNAME'),
'PASSWORD': os.environ.get('DB_PASSWORD'),
'HOST': os.environ.get('DB_HOSTNAME'),
'PORT': os.environ.get('DB_PORT'),
},
}
BROKER_URL = 'redis://localhost:6379/1'
CELERY_RESULT_BACKEND = BROKER_URL
CELERY_BROKER_URL = BROKER_URL
# Booking API configuration
GUESTONLINE_SERVICE = 'https://api.guestonline.fr/'
GUESTONLINE_TOKEN = ''
LASTABLE_SERVICE = ''
LASTABLE_TOKEN = ''
LASTABLE_PROXY = ''