forked from HXLStandard/hxl-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py.TEMPLATE
124 lines (104 loc) · 2.85 KB
/
config.py.TEMPLATE
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
########################################################################
# Configuration template for hxl-proxy
#
# Copy this to config.py (or similar), then change the values to suit.
# Before launching the application, set the environment variable
# HXL_PROXY_CONFIG to the full path to your config file, so that
# the hxl-proxy app can find it.
########################################################################
#
# If True, will show detailed debugging information on errors
# Should be False for a production system
#
DEBUG=True
#
# Change this to a key known only to your server
# (Used to secure cookies)
#
SECRET_KEY='<secret key>'
#
# Admin password MD5 hash
# To generate, use this command (replacing "PASSWORD" with your password):
# $ python -c 'import hashlib; print(hashlib.md5("PASSWORD".encode("utf-8")).hexdigest())'
#
ADMIN_PASSWORD_MD5='<md5 hash>'
#
# Output cache configuration
# see https://flask-caching.readthedocs.io/en/latest/#built-in-cache-backends
#
# filesystem output cache
CACHE_CONFIG = {
'CACHE_TYPE': 'filesystem',
'CACHE_DIR': '/tmp/',
'CACHE_THRESHOLD': 1000,
'CACHE_DEFAULT_TIMEOUT': 3600,
}
# redis output cache
#CACHE_CONFIG = {
# 'CACHE_TYPE': 'redis',
# 'CACHE_KEY_PREFIX': 'hxl-proxy-out:',
# 'CACHE_DEFAULT_TIMEOUT': 3600,
# 'CACHE_REDIS_HOST': '127.0.0.1',
# 'CACHE_REDIS_PORT': '6379',
# 'CACHE_REDIS_PASSWORD': '',
# 'CACHE_REDIS_DB': '',
# 'CACHE_REDIS_URL': ''
#}
#
# Request cache configuration (input)
#
REQUEST_CACHE_NAME = 'hxl-proxy-in' # no trailing colon needed
REQUEST_CACHE_BACKEND = 'memory'
#REQUEST_CACHE_BACKEND = 'redis'
REQUEST_CACHE_TIMEOUT_SECONDS = 3600
# Cache timeout for requests to iTOS
ITOS_CACHE_NAME = 'itos-in' # no trailing colon needed
ITOS_CACHE_BACKEND = 'memory'
#ITOS_CACHE_BACKEND = 'redis'
ITOS_CACHE_TIMEOUT = 604800
#
# Database connection info
#
# Uncomment for SQLite3
DB_TYPE='sqlite3'
DB_FILE='/tmp/hxl-proxy.db'
# Uncomment for MySQL
# DB_TYPE='mysql'
# DB_HOST='localhost'
# DB_PORT=3306
# DB_DATABASE='hxl_proxy'
# DB_USERNAME='username'
# DB_PASSWORD='password'
#
# Values for Google Drive access
#
GOOGLE_CLIENT_ID = '<client id>'
GOOGLE_OAUTH_ID = '<oauth id>'
#
# Values for Humanitarian.ID remote login
#
HID_CLIENT_ID = '<client id>'
HID_CLIENT_SECRET = '<client secret>'
HID_REDIRECT_URI = '<redirect URI>'
HID_BASE_URL = 'https://auth.humanitarian.id' # change to http://auth.dev.humanitarian.id for dev testing
#
# Where to find shapes, etc. for p-codes. Usually leave as-is.
#
PCODE_BASE_URL = 'https://hxlstandard.github.io/p-codes'
#
# Countries available for mapping (update as needed).
#
PCODE_COUNTRY_MAP = {
'Burundi': 'BDI',
'Cameroon': 'CMR',
'Chad': 'TCD',
'Ecuador': 'ECU',
'Guinea': 'GIN',
'Haiti': 'HTI',
'Mali': 'MLI',
'Nepal': 'NPL',
'Niger': 'NER',
'Nigeria': 'NGA',
'Somalia': 'SOM',
}
# end