forked from tecstack/kong-butler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
55 lines (49 loc) · 1.48 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
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author: daisheng
# Email: [email protected]
#
# This is the config file of global package of promise-butler.
# You can create your own instance/config.py which will cover this file.
# Also instance/nosetests_config.py has higher priority when testing.
#
import os
import logging
"""
common
"""
API_VERSION = 'v0.0'
# ENVIRONMENTS = ('qa', 'online')
ENVIRONMENTS = ('qa', )
ABS_BASEDIR = os.path.split(os.path.realpath(__file__))[0]
BASEDIR = os.path.abspath(os.path.dirname('..'))
DATA_FOLDER = os.path.join(BASEDIR, '.data')
LOG_FOLDER = os.path.join(BASEDIR, '.log')
LOGGER_FILE = os.path.join(LOG_FOLDER, 'debug.log')
TMP_FOLDER = os.path.join(BASEDIR, '.tmp')
CA_FOLDER = os.path.join(BASEDIR, '.ca')
UPLOAD_FOLDER = os.path.join(DATA_FOLDER, 'upload')
BACKUP_FOLDER = os.path.join(DATA_FOLDER, 'backup')
DEFAULT_LOGLEVEL = logging.DEBUG
"""
database
"""
# database access string setting, by default we use mysql
# for common using
SQLALCHEMY_DATABASE_URI = 'mysql://name:pass@yourmysql/butler'
SQLALCHEMY_POOL_RECYCLE = 5
PROPAGATE_EXCEPTIONS = True
KONGADM_URL = 'http://testurl.com'
KONGADM_APIKEY = None
KONGADM_BASICAUTH_USERNAME = None
KONGADM_BASICAUTH_PASSWORD = None
DEFAULT_ROOT_USERNAME = 'admin'
DEFAULT_ROOT_PASSWORD = 'admin'
DEFAULT_ROOT_ROLENAME = 'root'
# encryption keys
SECRET_KEY = 'your SECRET_KEY'
# salt used by token generation
AUTH_SALT = 'your AUTH SALT'
# salt used by password md5 hash
PSW_SALT = 'your PSW SALT'