-
Notifications
You must be signed in to change notification settings - Fork 19
/
config.py
52 lines (43 loc) · 1.51 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
# -*- coding: UTF-8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or '\xb1\xca\xb2\x00P\xd0\x14#\xff0\xe50d\x88\xc3\xf5\xcc\x90W!\x96\xf8%U'
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///{}/ctfd.db'.format(basedir)
SQLALCHEMY_TRACK_MODIFICATIONS = False
SESSION_TYPE = 'filesystem'
SESSION_FILE_DIR = '/tmp/flask_session'
SESSION_COOKIE_HTTPONLY = True
PERMANENT_SESSION_LIFETIME = 604800
UPLOAD_FOLDER = os.environ.get('UPLOAD_FOLDER') or os.path.join(os.path.dirname(os.path.abspath(__file__)),
'uploads')
LOG_FOLDER = os.environ.get('LOG_FOLDER') or os.path.join(basedir, 'logs')
REDIS_URL='redis://localhost:6379/0'
TEMPLATES_AUTO_RELOAD = True
class DevelopmentConfig(Config):
DEBUG=True
class TestingConfig(Config):
TESTING=True
class ProductionConfig(Config):
DEBUG=False
TESTING=False
config={
'development':DevelopmentConfig,
'testing':TestingConfig,
'production':ProductionConfig,
'default':DevelopmentConfig
}
docker_config={
'redis_host':'localhost',
'redis_port':6379,
'redis_db':0,
'redis_password':None,
'baseurl':'unix://var/run/docker.sock',
'network_name':'awd_test',
'network_prefix':'192.25',
'flag_prefix':'SUSCTF',
'expire':60,
'time_interval':60,
'ssh_user':'ciscn'
}