-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig.py
84 lines (70 loc) · 1.75 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class BaseConfig:
# Flask Settings
APP_NAME = "u-matter rest service"
APP_PORT = 5000
APP_HOST = "0.0.0.0"
DEBUG = True
# Mysql Settings
MYSQL_HOST = "localhost"
MYSQL_USER = "root"
MYSQL_PASSWORD = ""
MYSQL_DB = ""
MYSQL_PORT = 3306
# Mattermost settings
DAILY_POINT_LIMIT = 10
PER_TRANSACTION_POINT_LIMIT = 5
WEEKLY_THRESHOLD = 40
MM_SCHEME = "http"
MM_URL = "localhost"
MM_PORT = 8065
MM_BOT_TOKEN = ""
MM_SLASH_TOKEN = ""
# LOG FILE PATH
LOG_FILE_PATH = "event_logs.log"
class ProductionConfig(BaseConfig):
"""
Production configurations
"""
APP_PORT = 5000
APP_HOST = "0.0.0.0"
DEBUG = False
MYSQL_HOST = "db"
MYSQL_USER = "root"
MYSQL_PASSWORD = "root"
MYSQL_DB = "umatter"
MYSQL_PORT = 3306
MM_SCHEME = "http"
MM_URL = "host.docker.internal"
MM_PORT = 8065
MM_BOT_TOKEN = "wwgqj7p89t8zbqwsmd6nfg4srw"
MM_SLASH_TOKEN = "aax8t67esirpjmegijtqx1puae"
WEEKLY_THRESHOLD = 40
class DevelopmentConfig(BaseConfig):
"""
Development configurations
"""
APP_PORT = 5000
DEBUG = True
MYSQL_HOST = "localhost"
MYSQL_USER = "root"
MYSQL_PASSWORD = "root"
MYSQL_DB = "umatter"
MYSQL_PORT = 3306
MM_SCHEME = "http"
MM_URL = "localhost"
MM_PORT = 8065
MM_BOT_TOKEN = "wwgqj7p89t8zbqwsmd6nfg4srw"
MM_SLASH_TOKEN = "aax8t67esirpjmegijtqx1puae"
WEEKLY_THRESHOLD = 5
class TestingConfig(BaseConfig):
"""
Testing configurations
"""
app_config = {
'default': ProductionConfig,
'production': ProductionConfig,
'development': DevelopmentConfig,
'testing': TestingConfig,
}