-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmagpie.ini
184 lines (154 loc) · 5.73 KB
/
magpie.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
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
###
[composite:main]
use = egg:Paste#urlmap
/ = magpie_app
#/api = api_app
#/magpie/api = api_app
[app:magpie_app]
use = egg:pavics-magpie
filter-with = urlprefix
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
## magpie
# see all options in 'https://pavics-magpie.readthedocs.io/en/latest/configuration.html'
# NOTE:
# below port definitions must be aligned with the value employed in [server:main] section if running locally
# when running within a server architecture, they should be updated accordingly to the desired server endpoint
magpie.port = 2001
magpie.url = http://localhost:2001
# magpie.config_path =
# --- cookie definition --- (defaults below if omitted)
# refer to 'https://pavics-magpie.readthedocs.io/en/latest/configuration.html#security-settings'
# WARNING:
# Secret should be the same in Twitcher INI
# Otherwise, they cannot resolve same user references
magpie.secret =
# magpie.cookie_name = auth_tkt
# magpie.cookie_expire = # value in seconds, never expire by default
# --- temporary token definition --- (defaults below if omitted)
# note: token here refers to uuids employed in temporary URL endpoints, not security auth tokens
magpie.token_expire = 86400
# --- phoenix ---
magpie.push_phoenix = true
# --- user registration and approvals ---
# below values are the defaults, adjust accordingly for desired behavior
# email template overrides defaults in: magpie/api/templates
magpie.user_registration_enabled = false
magpie.user_registration_submission_email_template =
magpie.user_registration_approval_enabled = false
magpie.user_registration_approval_email_recipient =
magpie.user_registration_approval_email_template =
magpie.user_registration_approved_email_template =
magpie.user_registration_declined_email_template =
magpie.user_registration_notify_enabled = false
magpie.user_registration_notify_email_recipient =
magpie.user_registration_notify_email_template =
# --- user assignment to groups with t&c ---
magpie.group_terms_submission_email_template =
magpie.group_terms_approved_email_template =
# smtp server configuration
magpie.smtp_user = Magpie
magpie.smtp_from =
magpie.smtp_host =
magpie.smtp_port = 465
magpie.smtp_ssl = true
magpie.smtp_password =
# --- caching settings ---
# refer to 'https://pavics-magpie.readthedocs.io/en/latest/performance.html'
# WARNING:
# Caching settings should also be defined in Twitcher INI as it is that application that will
# receive most requests and actually ask Magpie to resolve ACL/Services for it to allow/deny access
cache.regions = acl, service
cache.type = memory
# control all caches with a single toggle, unless overridden by specific region enable setting
cache.enabled = false
# controls cache of user effective permission resolution by Access Control Lists
cache.acl.enabled = false
# cache.acl.expire = 30
# controls cache of service retrieval operations
cache.service.enabled = false
# cache.service.expire = 10
# amount of retries to allow following failed requests for specific
# database session/transaction errors (usually related to cache handling/reset timing)
retry.attempts = 2
# output request authentication details in logs
# WARNING:
# Enabling this feature will leak important authentication details in debug logs.
# Magpie logger in below section must also be set to DEBUG level.
magpie.debug_cookie_identity = false
[app:api_app]
use = egg:Paste#static
document_root = %(here)s/ui/swagger
[filter:urlprefix]
use = egg:PasteDeploy#prefix
# prefix must be adjusted according to 'MAGPIE_URL' / 'magpie.url'
prefix = /magpie
###
# wsgi server configuration
###
# NOTE:
# Below host/port (or bind) are the parameters that define where the wsgi app will be running locally.
# These usually must remain as such even when running within docker in a server architecture, as those
# values can be mapped to anything else outside.
# When running the web app locally (e.g.: development, debugging, testing) definitions should be aligned
# with the values employed in [app:magpie_app] section to make it easier finding the application endpoint.
# Setting fewer threads/workers can also be useful when debugging to avoid too many parallel processes.
[server:main]
use = egg:gunicorn#main
host = 0.0.0.0
port = 2001
timeout = 10
workers = 10
threads = 4
# used by magpie/alembic for database migration
# %(here)s corresponds to this directory
[alembic]
script_location = %(here)s/../magpie/alembic
#sqlalchemy.url = postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}/${POSTGRES_DB}
file_template = %%(year)d-%%(month).2d-%%(day).2d_%%(rev)s_%%(slug)s
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
keys = root, magpie, sqlalchemy, alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
formatter = generic
[logger_magpie]
level = INFO
handlers =
qualname = magpie
formatter = generic
[logger_sqlalchemy]
# "level = DEBUG" logs SQL queries, transactions and results
# "level = INFO" logs SQL queries (data can be identified from query field values)
# "level = WARN" logs neither (recommended for production systems, avoid anything below unless for dev/debug system)
level = WARN
handlers =
qualname = sqlalchemy.engine
formatter = generic
[logger_alembic]
level = INFO
handlers =
qualname = alembic
formatter = generic
[handler_console]
class = StreamHandler
args = (sys.stdout,)
level = NOTSET
formatter = generic
[formatter_generic]
format = [%(asctime)s] %(levelname)-10.10s [%(threadName)s][%(name)s] %(message)s