-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.ini
304 lines (233 loc) · 10 KB
/
config.ini
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# ==============================================================================
# OLD Configuration
# ==============================================================================
#
# The default settings provided here should work for production deployments of
# the OLD. All of these configuration settings should be overridable by
# environment variables; the equivalent environment variables (with alternative
# values) are given in comments above the relevant settings, e.g., OLD_DB_USER.
#
# See http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
# OLD App config
# ==============================================================================
[app:main]
use = egg:old
#[filter:translogger]
#use = egg:Paste#translogger
#[pipeline:main]
#pipeline = translogger
# old
# Pyramid config
# ------------------------------------------------------------------------------
# When this value is true, templates are automatically reloaded whenever they
# are modified without restarting the application, so you can see changes to
# templates take effect immediately during development. Not really relevant to
# the OLD as templates are not used.
# PYRAMID_RELOAD_TEMPLATES=1
pyramid.reload_templates = false
# Print view-related NotFound debug messages to stderr when this value is true.
# PYRAMID_DEBUG_NOTFOUND=1
pyramid.debug_notfound = false
# Print debugging messages related to url dispatch route matching when this
# value is true.
# PYRAMID_DEBUG_ROUTEMATCH=1
pyramid.debug_routematch = false
# PYRAMID_DEFAULT_LOCALE_NAME=de
pyramid.default_locale_name = en
# The debug toolbar should not be used in production. To use it in development,
# uncomment the following line.
# pyramid.includes = pyramid_debugtoolbar
# Beaker sessions config
# ------------------------------------------------------------------------------
# Beaker is used to store sessions across requests in order to implement
# authentication and authorization. See
# - http://beaker.readthedocs.io/en/latest/configuration.html
# - https://docs.pylonsproject.org/projects/pyramid_beaker/en/latest/
# Back-end type: ext:database. Since multiple OLD processes (potentially
# on different machines) can be collectively serving requests to multiple
# distinct OLD instances (dbs), the back-end used must be an external database
# (or we could use MongoDB or Redis...).
# OLD_SESSION_TYPE
session.type = ext:database
# Beaker session URL. This is left empty because the default behaviour is to
# use the same database that stores the OLD data, i.e., the value of the
# 'sqlalchemy.url' key, which is generated in old/__init__.py. The table name
# created by Beaker should be 'beaker_cache'. TODO: this env var is being
# overridden universally so is there any point to having it?
# OLD_SESSION_URL
session.url =
# This is only needed for file-type sessions.
# OLD_SESSION_DATA_DIR
session.data_dir = %(here)s/data/sessions/data
# Used with every back-end, to coordinate locking. With caching, this lock file
# is used to ensure that multiple processes/threads aren't attempting to
# re-create the same value at the same time (The Dog-Pile Effect).
# The OLD modifies this value on a per-request basis by appending the OLD
# instance name (which is parsed from the URL) to this directory.
# OLD_SESSION_LOCK_DIR
session.lock_dir = %(here)s/data/sessions/lock
# Name of the cookie key used to save the session under. As with the lock_dir
# value, the OLD modifies this value on a per-request basis by appending the OLD
# instance name (which is parsed from the URL) to this directory.
# OLD_SESSION_KEY
session.key = old
# Beaker session key. Used with the HMAC to ensure session integrity. This
# value should ideally be a randomly generated string. When using in a cluster
# environment, the secret must be the same on every machine.
# OLD_SESSION_SECRET
session.secret = db49238825c4409897b39f49f29e4d77
# Beaker session cookie expires. Determines when the cookie used to track the
# client-side of the session will expire. When set to a boolean value, it will
# either expire at the end of the browsers session, or never expire.
# OLD_SESSION_COOKIE_EXPIRES
session.cookie_expires = true
# Whether or not the cookie should only be sent over SSL.
# OLD_SESSION_SECURE
session.secure = true
# SameSite value for the cookie -- should be either Lax, Strict, or None.
# OLD_SESSION_SAMESITE
session.samesite = None
# SQLAlchemy config
# ------------------------------------------------------------------------------
# Instead of using the sqlalchemy.url configuration setting as is normal for a
# Pyramid application, (e.g., ``sqlalchemy.url =
# mysql+oursql://<user>:<password>@<host>[:<port>]/<dbname>``), the OLD
# requires that the components of that setting be provided individually, either
# in this config file or via environment variables. See below.
# A single OLD process can be used to serve requests against multiple logically
# distinct OLD instances (i.e., database / file system path pairs), depending on
# the prefix of the URL path. All of these MySQL databases must be at the same
# host/port and accessible to the same MySQL user.
# Default is mysql, but sqlite should also work.
# OLD_DB_RDBMS
db.rdbms = mysql
# OLD_DB_USER
db.user = old
# OLD_DB_PASSWORD
db.password = demo
# OLD_DB_HOST
db.host = localhost
# OLD_DB_PORT
db.port = 3306
# This should be the name of the OLD instance (database and directory name) to
# use when running the tests.
# OLD_NAME_TESTS
old_name_tests = oldtests
# This should be the name of the second OLD instance (database and directory
# name) to use when running tests that require 2 OLD instances.
# OLD_NAME_2_TESTS
old_name_2_tests = oldtests2
# This is required if SQLite is being used. It should be a full path to the
# directory where the SQLite database file is (should be) located.
# OLD_DB_DIRPATH
db.dirpath = %(here)s
# See http://docs.sqlalchemy.org/en/latest/core/pooling.html.
# SQLALCHEMY_POOL_RECYCLE
sqlalchemy.pool_recycle = 3600
# General OLD config
# ------------------------------------------------------------------------------
# Set this to 1 if the tests are being run.
# OLD_TESTING
testing = 0
# Set this to 1 if this OLD is being run in read-only mode
# OLD_READONLY
readonly = 0
# Permanent Store: for storing binary files for corpora, files, users,
# phonologies, etc. In the default case, these files will be under a
# subdirectory of permanent_store with the name being the value of
# ``old/lib/constants.py::OLD_NAME_DFLT``, i.e., 'old'. When the OLD being
# served is not 'old', the files will be stored in a subdirectory of
# permanent_store named after that OLD.
# OLD_PERMANENT_STORE
permanent_store = %(here)s/store
# Add Language Data: boolean indicating whether or not ISO 639-3 language data
# will be entered when initializing the database. Used in
# old/scripts/initializedb.py.
# OLD_ADD_LANGUAGE_DATA
add_language_data = 1
# Empty Database: set this to 1 if you want calls to
# old/scripts/initializedb.py to have no effect on the database.
# OLD_EMPTY_DATABASE
empty_database = 0
# Create reduced size file copies: set this to 0 if you do not want the system
# to create copies of images and .wav files with reduced sizes. Default is 1
# (i.e, true).
# OLD_CREATE_REDUCED_SIZE_FILE_COPIES
create_reduced_size_file_copies = 1
# For preferred_lossy_audio_format choose one of 'ogg' (Ogg Vorbis) or 'mp3'.
# Default is 'ogg'. If mp3 is chosen and ffmpeg cannot encode mp3, ogg will be
# used instead.
# OLD_PREFERRED_LOSSY_AUDIO_FORMAT
preferred_lossy_audio_format = ogg
# Emails
# ------------------------------------------------------------------------------
# When sending "password reset" emails, the system will use the hostname
# specified as password_reset_smtp_server or the corresponding environment variable.
# If password_reset_smtp_server is 'smtp.gmail.com', then Gmail will be used to
# send the email. In that case, the Gmail from address and password are
# required as environment variables.
# OLD_PASSWORD_RESET_SMTP_SERVER
password_reset_smtp_server = localhost
# Test email TO. Specify a test_email_to value **only** if you want to override
# the recipient email with a given value in all reset-password-via-email TEST
# requests.
# OLD_TEST_EMAIL_TO
test_email_to =
# Valuate these environment variables if 'smtp.gmail.com' is the value of
# password_reset_smtp_server. Do **not** save these in the config file.
# OLD_GMAIL_FROM_ADDRESS
# gmail_from_address
# OLD_GMAIL_FROM_PASSWORD
# gmail_from_password
# WSGI Server config
# ==============================================================================
[server:main]
# Serve the OLD using Waitress.
# See https://docs.pylonsproject.org/projects/waitress/en/latest/
# TODO: show gunicorn config...
# See https://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gunicorn.html
# and http://docs.gunicorn.org/en/stable/settings.html
use = egg:waitress#main
host = %(http_host)s
port = %(http_port)s
# Logging config
# ==============================================================================
# See http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
[loggers]
keys = root, old, sqlalchemy, wsgi
[handlers]
keys = console
[formatters]
keys = generic
# Will be used by all applications in the Pyramid process that ask for a logger
# (via logging.getLogger) that has a name which begins with anything except
# 'old'. Change level to DEBUG to see Beaker and SQLAlchemy debug logs.
[logger_root]
level = INFO
handlers = console
[logger_old]
level = INFO
handlers = console
qualname = old
propagate = 0
[logger_sqlalchemy]
level = WARN
handlers = console
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)
[logger_wsgi]
level = INFO
handlers = console
qualname = wsgi
formatter = wsgi
[handler_console]
class = StreamHandler
args = (sys.stdout,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
[formatter_wsgi]
format = %(message)s