-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathlocal_config.py.example
251 lines (179 loc) · 8.14 KB
/
local_config.py.example
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
"""Example for a local_config.py file."""
import os
#######################################
## Application options ################
#######################################
# organization = 'Name of Organization'
# Default: 'unconfigured organization'
# Set organization to the name of your organization. This name will be
# displayed in the HTML <title> elements across the various pages of the
# application.
#######################################
# admin_email = "Initial administrator's e-mail address"
# Default: '[email protected]'
# Set admin_email to the e-mail address of the administrator of this
# installation of Dokomo Forms. This will be the only account that can log in
# at first.
#######################################
# admin_name = "Initial administrator's user name"
# Default: 'admin'
# Set admin_name to the user name of the administrator of this
# installation of Dokomo Forms.
#######################################
# demo = True
# Default: False
# Set demo = True to run the webapp in demo mode. In demo mode anyone can log
# in as a dummy administrator account with some prepopulated data.
#######################################
# port = 8888
# Default: 8888
# Set port = <integer> to run the webapp on the specified port. The port
# specified in config.py is 8888, so you don't have to set this value yourself
# unless you want to use a different port. Note that some of the tests in the
# test suite assume that tests/python/selenium_webapp.py is running on port
# 9999.
#######################################
# log_to_file = False
# Default: True
# Set log_to_file = False to display all log output to stdout/stderr. Otherwise
# all the application logs will be in .log files in the log/ directory.
#######################################
# debug = True
# Default: False
# Set debug = True to run the webapp in debug mode. In debug mode a number of
# /debug/ URL endpoints are available (defined in webapp.py) that allow any
# user to do a number of potentially dangerous things, such as log in as any
# user. This also sets Tornado's debug mode to True.
#
# WARNING:
# Only enable debug mode if you are developing the Dokomo Forms software
# itself. Never enable debug mode in production.
#
# NEVER ENABLE DEBUG MODE IN PRODUCTION!!!
#######################################
# https = False
# Default: True
# Set https = False to put the webapp into HTTP mode (can not serve HTTPS
# traffic).
#
# WARNING:
# Some of the features of the application will only work if served over HTTPS.
# Do not set https = False unless you want to develop the application without
# bothering with a dummy self-signed certificate.
#######################################
# persona_verification_url = 'Some URL'
# Default: 'https://verifier.login.persona.org/verify'
# Under normal circumstances you should not change this setting.
# persona_verification_url tells the application which server to use for
# authentication using Mozilla Persona.
#######################################
# revisit_url = 'some URL'
# Default: 'https://revisit.global/api/v0/facilities.json'
# Set revisit_url to tell the application which Revisit server to use as a
# registry for facility data. By default it will use the official
# revisit.global server. You may wish to use staging.revisit.global instead
# for testing purposes
#######################################
## Database options ###################
#######################################
# schema = 'schema name'
# Default: 'doko'
# The schema setting is the name of the PostgreSQL schema that will be used
# for the application's database tables. The schema will be created if it does
# not exist.
#######################################
db_host = os.environ.get('DB_DEV_PORT_5432_TCP_ADDR', 'localhost')
# Default: os.environ.get('DB_PORT_5432_TCP_ADDR', 'localhost')
# db_host is the database server address that the application will use.
# If you are running the application and the database on the same bare metal
# machine, the server address should be 'localhost'. If you are deploying to
# production using Docker, the address should come from the
# DB_PORT_5432_TCP_ADDR environment variable. If you are using Docker for local
# development, the address should come from the
# DB_DEV_PORT_5432_TCP_ADDR environment variable.
#######################################
db_port = os.environ.get('DB_DEV_PORT_5432_TCP_PORT', '5432')
# Default: os.environ.get('DB_PORT_5432_TCP_PORT', '5432')
# db_port is the database server port that the application will use. If you are
# running the application and the database on the same bare metal machine, the
# port should probably be '5432', which is the default port for PostgreSQL. If
# you are deploying to production using Docker, the address should come from
# the DB_PORT_5432_TCP_PORT environment variable. If you are using Docker for
# local development, the address should come from the
# DB_DEV_PORT_5432_TCP_PORT environment variable.
#######################################
# db_database = 'database name'
# Default: 'doko'
# The name of the PostgreSQL database (used when connecting).
#######################################
# db_user = 'user name'
# Default: 'travis'
# The PostgreSQL database user.
#######################################
db_password = os.environ.get(
'DB_DEV_ENV_POSTGRES_PASSWORD', 'database password'
)
# Default: os.environ.get('DB_ENV_POSTGRES_PASSWORD', 'database password')
# db_password is the PostgreSQL database password for the user specified by
# db_user. If you are running the application and the database on the same
# bare metal machine, the password is whatever you set it to be. If you are
# deploying to production using Docker, the address should come from the
# DB_ENV_POSTGRES_PASSWORD environment variable. If you are using Docker for
# local development, the address should come from the
# DB_DEV_ENV_POSTGRES_PASSWORD environment variable.
#######################################
# pool_size = <integer>
# Default: None
# Set pool_size to specify the number of database connections to keep in the
# pool. You can usually leave this alone.
#######################################
# max_overflow = <integer>
# Default: None
# Set max_overflow to specify the maximum number of database connections that
# can be open at once. You can usually leave this alone.
#######################################
# kill = True
# Default: False
# Set kill = True to drop the schema (default 'doko') if it exists before
# starting the application.
#
# WARNING:
# This will permanently erase any and all data that exists in schema if it
# exists. You should only use this if you are developing the application.
#
# THIS IS A DESTRUCTIVE OPTION
# IT WILL ERASE DATA!!!
#######################################
## Testing options ####################
#######################################
# TEST_USER = 'a UUID4'
# Set TEST_USER to a user ID to log in automatically as that user if you run
# tests/python/webapp.py
#######################################
# SAUCE_CONNECT = True
# Set SAUCE_CONNECT = True (if you don't want to set it as an environment
# variable) in order to run the tests in tests/python/test_selenium.py on
# Sauce Labs using their Sauce Connect software. The next few settings
# will only apply if SAUCE_CONNECT = True (or the environment variable is set).
#######################################
# SAUCE_USERNAME = 'user name'
# The Sauce Labs user account name.
#######################################
# SAUCE_ACCESS_KEY = 'access key'
# The access key associated with SAUCE_USERNAME.
#######################################
# DEFAULT_BROWSER = 'firefox::Linux'
# The browser to use when running a test on Sauce Labs. The format is
# browser_name:version:platform:other
# The default version is the latest browser version.
# The default platform is Linux.
# "other" is (for now) the deviceName for android or iPhone test runs.
#
# For instance, to run a test on an Android 5.0 emulator, use:
# DEFAULT_BROWSER = 'android:5.0:Linux:AndroidEmulator'
# To run a test on Chrome 45 on Windows 8.1:
# DEFAULT_BROWSER = 'chrome:45.0:Windows 8.1'
#
# Take a look here for other examples:
# https://github.com/dokomo-sauce-matrix/dokomoforms/blob/
# e560cb97638f75001f4ccf94c6576678d0195169/.travis.yml#L14-L47