-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
49 lines (39 loc) · 1.02 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
import os
import zmq
class Config(object):
DEBUG = False
TESTING = False
basedir = os.path.abspath(os.path.dirname(__file__))
SECRET_KEY = os.urandom(32)
ZMQ_SOCKET_TYPE = zmq.PUSH
class ProductionConfig(Config):
MONGODB_SETTINGS = {
'DB': 'phishing-alert',
'host': 'mongo',
'port': 27017,
}
ZMQ_BIND_ADDR = 'tcp://domain_processor:43001'
class DebugConfig(Config):
DEBUG = True
MONGODB_SETTINGS = {
'DB': 'phishing-alert',
'host': 'localhost',
'port': 27017,
}
ZMQ_BIND_ADDR = 'tcp://127.0.0.1:43001'
class TestConfig(Config):
TESTING = True
basedir = os.path.abspath(os.path.dirname(__file__))
MONGODB_SETTINGS = {
'DB': 'phishing-alert-test',
'host': 'localhost',
'port': 27017,
}
SECRET_KEY = os.urandom(32)
ZMQ_BIND_ADDR = 'tcp://127.0.0.1:43001'
ZMQ_SOCKET_TYPE = zmq.PUSH
config_dict = {
'Production': ProductionConfig,
'Debug': DebugConfig,
'Testing': TestConfig
}