-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
54 lines (38 loc) · 1.06 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os
from dmutils.status import enabled_since, get_version_label
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
VERSION = get_version_label(
os.path.abspath(os.path.dirname(__file__))
)
AUTH_REQUIRED = True
ALLOW_EXPLORER = True
ELASTICSEARCH_HOST = os.getenv('DM_ELASTICSEARCH_URL', 'localhost:9200')
DM_SEARCH_PAGE_SIZE = 100
# Logging
DM_LOG_LEVEL = 'DEBUG'
DM_APP_NAME = 'search-api'
DM_LOG_PATH = '/var/log/digitalmarketplace/application.log'
DM_REQUEST_ID_HEADER = 'DM-Request-ID'
DM_DOWNSTREAM_REQUEST_ID_HEADER = 'X-Amz-Cf-Id'
# Feature Flags
RAISE_ERROR_ON_MISSING_FEATURES = True
@staticmethod
def init_app(app):
pass
class Test(Config):
DEBUG = True
DM_LOG_LEVEL = 'CRITICAL'
class Development(Config):
DEBUG = False
DM_SEARCH_PAGE_SIZE = 5
class Live(Config):
DEBUG = False
ALLOW_EXPLORER = False
config = {
'development': Development,
'preview': Live,
'staging': Live,
'production': Live,
'test': Test,
}