-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
42 lines (32 loc) · 1.53 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
import os
from distutils.util import strtobool
class BaseConfig:
PORT = os.getenv("PORT")
HOST = os.getenv('HOST')
LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "INFO")
RH_SVC_URL = os.getenv("RH_SVC_URL")
DOMAIN_URL = os.getenv("DOMAIN_URL")
DOMAIN_URL_PROTOCOL = os.getenv("DOMAIN_URL_PROTOCOL")
SECRET_KEY = os.getenv("SECRET_KEY")
SESSION_COOKIE_SECURE = bool(strtobool(os.getenv('SESSION_COOKIE_SECURE', 'True')))
GOOGLE_TAG_ID = os.getenv("GOOGLE_TAG_ID")
# Account service url is a link back to our service that we send to eq as part of the token
ACCOUNT_SERVICE_URL = f"{DOMAIN_URL_PROTOCOL}{DOMAIN_URL}"
LANGUAGES = ['en', 'cy']
EQ_URL = os.getenv('EQ_URL')
class DevelopmentConfig(BaseConfig):
DEBUG = False
PORT = os.getenv("PORT", 9092)
HOST = os.getenv('HOST', '0.0.0.0')
LOGGING_LEVEL = os.getenv("LOGGING_LEVEL", "DEBUG")
EQ_URL = os.getenv('EQ_URL', 'http://localhost:5000')
DOMAIN_URL = os.getenv("DOMAIN_URL", "localhost:9092")
DOMAIN_URL_PROTOCOL = os.getenv("DOMAIN_URL_PROTOCOL", 'http://')
SECRET_KEY = os.getenv('SECRET_KEY', b'_5#y2L"F4Q8z\n\xec]/')
SESSION_COOKIE_SECURE = bool(strtobool(os.getenv('SESSION_COOKIE_SECURE', 'False')))
GOOGLE_TAG_ID = os.getenv("GOOGLE_TAG_ID", "G-XXXXXXXXXX")
ACCOUNT_SERVICE_URL = f"{DOMAIN_URL_PROTOCOL}{DOMAIN_URL}"
RH_SVC_URL = os.getenv("RH_SVC_URL", "http://localhost:8071")
class TestingConfig(DevelopmentConfig):
DEBUG = False
RH_SVC_URL = os.getenv("RH_SVC_URL", "http://localhost:9071")