forked from eevee/floof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaster.ini
216 lines (174 loc) · 6.39 KB
/
paster.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
### Pyramid configuration for floof
# Developers: run as
# pserve --reload -n dev config.ini
# or just use bin/dev-server.sh. If you want to customize, see
# custom-example.ini for how to do that without angering the git gods.
# Items that should (or must) vary per machine are marked CHANGEME
[server:main]
use = egg:Paste#http
# CHANGEME: This may be publicly accessible! For production, use gunicorn and
# comment these out.
host = 0.0.0.0
port = 6543
################################################################################
### Production configuration
[app:floof-prod]
use = egg:floof#pyramid
# Pyramid built-ins
default_locale_name = en
# Pyramid's pipeline.
# CHANGEME in production; you certainly want either airbrake or exclog, or
# exceptions won't be logged anywhere
pyramid.includes =
# Airbrake is a service that aggragates error reports for you; requires
# pyramid_airbrake and an API key
# pyramid_airbrake
# exclog logs exceptions via the normal Python logging mechanism, which can
# then send emails or do whatever else you want.
# pyramid_exclog
#airbrake.api_key = ...
#airbrake.handler = blocking
# PySCSS; you probably don't want to touch this
scss.asset_path =
floof:assets/scss
floof:assets/vendor/archetype/scss
scss.compress = true
scss.cache = true
# Mako: http://docs.pylonsproject.org/projects/pyramid/1.1/narr/environment.html#mako-template-renderer-settings
mako.directories = floof:templates
mako.strict_undefined = true
# SQLAlchemy
# CHANGEME in production
sqlalchemy.url = sqlite:///%(here)s/floof.db
# Beaker sessions: http://beaker.groovie.org/configuration.html
# CHANGEME in production, preferably to ext:database
session.type = file
session.data_dir = %(here)s/data/sessions/data
session.lock_dir = %(here)s/data/sessions/lock
session.key = floof
# CHANGEME
session.secret = somesecret
session.httponly = true
session.secure = true
# (two weeks)
session.timeout = 1209600
### floof-specific
# Site title, appears in <title> and elsewhere
site_title = squiggle
# Generated thumbnails will be this size
thumbnail_size = 160
# How wide a range should ratings have?
rating_radius = 1
# Storage for uploaded files, either 'local' or 'mogilefs'
filestore = local
filestore.directory = %(here)s/floof/assets/files
;filestore = mogilefs
;filestore.trackers = localhost:7001
;filestore.domain = floof
# CDN root; if given, this will be used for serving files. It must be a
# full URL, though you should leave off the trailing slash.
# CHANGEME in production
;cdn_root = http://cdn.example.com
### floof authentication
# XXX Should we be performing this hard confirmation on the return_url of
# OpenID assesrtions as well? (request.route_url ultimately uses HTTP_HOST)
# See: https://github.com/mozilla/browserid/wiki/Security-Considerations-when-Implementing-BrowserID
# The scheme, host and port of the site; no trailing slash
# CHANGEME
auth.persona.audience = https://localhost
# The time, in seconds, to consider a successful verification 'recent'
auth.persona.expiry_seconds = 600
auth.openid.expiry_seconds = 600
# Allow client certificate authentication
# A potentially DANGEROUS option -- you *must* sanitize the transport
# See: http://bugs.veekun.com/projects/floof/wiki/Client_Certificates
# (The UI presently assumes that it is always "true")
auth.certs.enabled = false
# Determines where to look for the client certificate serial passed from the
# frontend HTTPS server. May be 'http_headers' or 'wsgi_environ'
auth.certs.transport = http_headers
# Where to generate and keep the CA for SSL client certificate authentication
auth.certs.directory = %(here)s/certs
################################################################################
### Development configuration
[app:floof-dev]
use = floof-prod
# Pyramid debugging; these are useful defaults
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = true
pyramid.debug_routematch = false
pyramid.debug_templates = true
pyramid.includes =
pyramid_debugtoolbar
# Exclude the introspection panel; it's big and slow and not really all that
# useful. Also include our session panel.
debugtoolbar.panels =
pyramid_debugtoolbar.panels.versions.VersionDebugPanel
pyramid_debugtoolbar.panels.settings.SettingsDebugPanel
pyramid_debugtoolbar.panels.headers.HeaderDebugPanel
pyramid_debugtoolbar.panels.request_vars.RequestVarsDebugPanel
pyramid_debugtoolbar.panels.renderings.RenderingsDebugPanel
pyramid_debugtoolbar.panels.logger.LoggingPanel
pyramid_debugtoolbar.panels.performance.PerformanceDebugPanel
pyramid_debugtoolbar.panels.routes.RoutesDebugPanel
pyramid_debugtoolbar.panels.sqla.SQLADebugPanel
pyramid_debugtoolbar.panels.tweens.TweensDebugPanel
floof.lib.debugging.SessionDebugPanel
# Secure cookies don't play well with insecure dev
session.secure = false
# Don't compress SCSS, for ease of reading
scss.compress = false
scss.cache = false
# Generic "are you a developer" signal, most significantly it controls whether
# unexpected errors are handled by a generic in-site error page or allowed to
# propagate up (eg to a dubugger)
floof.debug = true
################################################################################
### Testing configuration
[app:floof-test]
use = floof-dev
sqlalchemy.url = sqlite://
################################################################################
### App pipeline
[filter:paste-prefix]
# This isn't actually used for prefixing, but it makes the app aware of the
# scheme (i.e., https).
use = egg:PasteDeploy#prefix
[filter:tm]
# That is, "transaction manager"
use = egg:repoze.tm2#tm
commit_veto = repoze.tm:default_commit_veto
[pipeline:main]
pipeline = paste-prefix tm floof-prod
[pipeline:dev]
pipeline = paste-prefix tm floof-dev
### Logging
# CHANGEME you may want to redirect or filter this logging
[loggers]
keys = root, floof, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
[logger_floof]
level = WARN
handlers =
qualname = floof
[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.)
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s