Skip to content
This repository
Newer
Older
100755 435 lines (360 sloc) 13.067 kb
4778b17e »
2008-06-17 initial checkin
1 #
2 # r2 - Pylons development environment configuration
3 #
4 # The %(here)s variable will be replaced with the parent directory of this file
5 #
6 [DEFAULT]
e6838895 »
2010-05-17 New Features
7
8 # -- debug and configuation flags --
9 # global debug flag -- displays pylons stacktrace rather than 500 page on error when true
4778b17e »
2008-06-17 initial checkin
10 debug = true
8b5cad86 »
2012-01-25 Move toggle for template caching into its own .ini flag.
11 # enables/disables whitespace removal (for development)
12 template_debug = false
13 # enables/disables compiled template caching and template file mtime checking
14 reload_templates = true
e6838895 »
2010-05-17 New Features
15 # use uncompressed static files (out of /static/js and /static/css)
16 # rather than compressed files out of /static (for development if true)
4778b17e »
2008-06-17 initial checkin
17 uncompressedJS = true
e6838895 »
2010-05-17 New Features
18 # enable/disable verbose SQL printing
9813d947 »
2009-04-29 Make reddit compatible with Postgres 8.3 and Python 2.6
19 sqlprinting = false
e6838895 »
2010-05-17 New Features
20 # enable/disable writing errors as they occur to a rabbit-mq queue
a402d48d »
2010-05-03 New features:
21 exception_logging = false
e6838895 »
2010-05-17 New Features
22 # whether to print a "reddit app started" message at start"
5ef76b96 »
2010-05-03 New features:
23 log_start = true
e6838895 »
2010-05-17 New Features
24 # enable/disable logging for amqp/rabbitmq
25 amqp_logging = false
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
26 # emergency measures: makes the site read only
27 read_only_mode = false
68a06c56 »
2011-04-14 April 2011 Merge
28 # global switch for wiki write permissions
29 allow_wiki_editing = true
4758ac8d »
2011-07-22 Make read-only mode slightly less frustrating.
30 # a modified read only mode used for cache shown during heavy load 503s
31 heavy_load_mode = false
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
32
0cf053f4 »
2011-10-08 Add blank announcement_message to example.ini.
33 # a message placed in the infobar
34 announcement_message =
a86261f3 »
2011-08-08 Add a contextual description metatag for scrapers.
35 # the site's tagline, used in the title and description
36 short_description = open source is awesome
37
e6838895 »
2010-05-17 New Features
38 # -- SECRETS! <-- update these first! --
39 # global secret
40 SECRET = abcdefghijklmnopqrstuvwxyz0123456789
41 # secret for making the modhash
42 MODSECRET = abcdefghijklmnopqrstuvwxyz0123456789
43 # secret for /prefs/feeds
44 FEEDSECRET = abcdefghijklmnopqrstuvwxyz0123456789
5721e468 »
2011-09-15 Add validator that checks a secret key or admin cookie.
45 # used for authenticating admin API calls w/o cookie
46 ADMINSECRET = abcdefghijklmnopqrstuvwxyz0123456789
5ef76b96 »
2010-05-03 New features:
47
7fff900b »
2011-02-23 February 2011 Merge
48 INDEXTANK_API_URL =
49
d411cd55 »
2010-11-06 Added support for disabling adds via config file
50 # -- feature toggles --
51 disable_ads = false
92fdd422 »
2011-05-16 Added option to disable captcha verification
52 disable_captcha = false
1ecb427f »
2011-08-10 Add an option to disable rate limiting. For testing.
53 disable_ratelimit = false
d411cd55 »
2010-11-06 Added support for disabling adds via config file
54
e6838895 »
2010-05-17 New Features
55 # -- important settings --
56 # the domain that this app serves itself up as
7fff900b »
2011-02-23 February 2011 Merge
57 domain = reddit.local
68a06c56 »
2011-04-14 April 2011 Merge
58 # the short domain (like redd.it)
59 shortdomain =
e6838895 »
2010-05-17 New Features
60 # if you use www for the old-timey feel, put it here
61 domain_prefix =
62 # the user used for "system" operations and messages
63 system_user = reddit
64 # list of admin accounts
65 admins = reddit
66 # the default subreddit for submissions
67 default_sr = reddit.com
e6178bed »
2011-05-16 Make default header image URL configurable.
68 # default header image url
50a5daa6 »
2011-10-19 Allow static files to be served from other domains.
69 default_header_url = reddit.com.header.png
e6838895 »
2010-05-17 New Features
70
71 # time for the page cache (for unlogged in users)
72 page_cache_time = 90
73
74 # default localization for strings (when using python's locale.format)
75 locale = C
76 # default site language (two letter character code)
77 lang = en
c280c6ac »
2011-09-20 Fix handling of an unset language override.
78 lang_override =
e7b672d6 »
2012-01-20 Replace proxy_addr with option to trust proxies in 10.0.0.0/8.
79 # if your webserver is a proxy and on a different instance on the same 10.0.0.0/8 network
80 # set X-forwarded-for and set this to true
81 trust_local_proxies = false
e6838895 »
2010-05-17 New Features
82 # hash for validating HTTP_TRUE_CLIENT_IP_HASH
83 ip_hash =
84 # timezone for storing
85 timezone = UTC
86 # timezone for the database
87 display_timezone = MST
88 # secret key for accessing /shutdown
89 shutdown_secret = 12345
b8477570 »
2011-10-06 Use cross domain https for slightly safer login.
90 # https api endpoint (must be g.domain or a subdomain of g.domain)
91 https_endpoint =
e6838895 »
2010-05-17 New Features
92 # name of the cookie to drop with login information
93 login_cookie = reddit_session
a311805c »
2011-10-20 Switch to bcrypt for password hashing.
94 # the work factor for bcrypt, increment this every time computers double in
95 # speed. don't worry, changing this won't break old passwords
96 bcrypt_work_factor = 12
e6838895 »
2010-05-17 New Features
97
98 # fraction of requests to pass into the queue-based usage sampler
99 usage_sampling = 0.
4778b17e »
2008-06-17 initial checkin
100
e6838895 »
2010-05-17 New Features
101 # account used for default feedback messaging (can be #subreddit)
102 admin_message_acct = reddit
103
104
105 # -- caching options --
106 # data cache (used for caching Thing objects)
107 num_mc_clients = 5
4778b17e »
2008-06-17 initial checkin
108 memcaches = 127.0.0.1:11211
7fff900b »
2011-02-23 February 2011 Merge
109 stalecaches =
e6838895 »
2010-05-17 New Features
110 # render caches (the second is "remote" and the local is optional but in the same format)
111 local_rendercache =
ae6ba7a7 »
2008-12-16 added a separate set of memcaches for the render cache
112 rendercaches = 127.0.0.1:11211
bf9f43cc »
2009-12-01 Messaging/commenting
113
67814d54 »
2010-05-03 Features:
114 # -- permacache options --
115 # permacache is memcaches -> cassanda -> memcachedb
116 # memcaches that sit in front of cassandra
117 permacache_memcaches = 127.0.0.1:11211
118 # cassandra hosts. one of these will be chosen at random by pycassa
9a4271f6 »
2010-06-15 Upgrade Instructions
119 cassandra_seeds = 127.0.0.1:9160
fcd3f3bb »
2012-02-02 Make cassandra connection pool size configurable.
120 # number of connections to keep open to the cassandra ring
121 cassandra_pool_size = 5
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
122 # read/write consistency levels for Cassandra
123 cassandra_rcl = ONE
7fff900b »
2011-02-23 February 2011 Merge
124 cassandra_wcl = ONE
532be3fe »
2011-11-30 Allow Cassandra models to choose a connection pool.
125 # name of default connection pool to use when _connection_pool not specified
126 cassandra_default_pool = main
bf9f43cc »
2009-12-01 Messaging/commenting
127
e6838895 »
2010-05-17 New Features
128 # -- url cache options --
129 url_caches = 127.0.0.1:11211
130 # cassandra hosts. one of these will be chosen at random by pycassa
131 url_seeds =
132
133
134 # caches for storing number of times a link is rendered
135 incr_cache = udp:localhost:11211
136 incr_caches = localhost:11211
137 # recommender cache (depricated)
138 rec_cache = 127.0.0.1:11211
139
140 ## -- traffic tracking urls --
93a65a6a »
2011-10-03 Move onload out of the app.
141 # domain to send tracking requests (see scripts/tracker.py)
142 tracking_domain = reddit.local
e6838895 »
2010-05-17 New Features
143 # image to render to track pageviews
144 tracker_url = /static/pixel.png
145 # images to render to track sponsored links
146 adtracker_url = /static/pixel.png
147 # image to render to track the ad frame
148 adframetracker_url = http://pixel.reddit.com/pixel/of_defenestration.png
149 # open redirector to bounce clicks off of on sponsored links for tracking
150 clicktracker_url = /static/pixel.png
7fff900b »
2011-02-23 February 2011 Merge
151 # new pixel
152 newtracker_url =
e6838895 »
2010-05-17 New Features
153
154 # amqp
bf9f43cc »
2009-12-01 Messaging/commenting
155 amqp_host = localhost:5672
e6838895 »
2010-05-17 New Features
156 amqp_user = reddit
157 amqp_pass = reddit
bf9f43cc »
2009-12-01 Messaging/commenting
158 amqp_virtual_host = /
159
e6838895 »
2010-05-17 New Features
160 ## -- database setup --
161 # list of all databases named in the subsequent table
162 databases = main, comment, vote, email, authorize, award, hc
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
163
7fff900b »
2011-02-23 February 2011 Merge
164 db_user = reddit
165 db_pass = password
166 db_port = 5432
167 db_pool_size = 3
168 db_pool_overflow_size = 3
169
170 #db name db host user, pass, port, conn, overflow_conn
171 main_db = reddit, 127.0.0.1, *, *, *, *, *
172 comment_db = reddit, 127.0.0.1, *, *, *, *, *
173 comment2_db = reddit, 127.0.0.1, *, *, *, *, *
174 vote_db = reddit, 127.0.0.1, *, *, *, *, *
175 email_db = reddit, 127.0.0.1, *, *, *, *, *
176 authorize_db = reddit, 127.0.0.1, *, *, *, *, *
177 award_db = reddit, 127.0.0.1, *, *, *, *, *
178 hc_db = reddit, 127.0.0.1, *, *, *, *, *
e6838895 »
2010-05-17 New Features
179
7fff900b »
2011-02-23 February 2011 Merge
180 hardcache_categories = *:hc:hc
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
181
e6838895 »
2010-05-17 New Features
182 # this setting will prefix all of the table names
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
183 db_app_name = reddit
e6838895 »
2010-05-17 New Features
184 # are we allowed to create tables?
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
185 db_create_tables = True
186
187 type_db = main
188 rel_type_db = main
5ef76b96 »
2010-05-03 New features:
189 hardcache_db = main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
190
191 db_table_link = thing, main, main
192 db_table_account = thing, main
193 db_table_message = thing, main
194
195 db_table_savehide = relation, account, link, main
196 db_table_click = relation, account, link, main
197
198 db_table_comment = thing, comment
199 db_table_subreddit = thing, comment
200
201 db_table_srmember = relation, subreddit, account, comment
202
203 db_table_friend = relation, account, account, comment
204
205 db_table_vote_account_link = relation, account, link, vote
206 db_table_vote_account_comment = relation, account, comment, vote
207
780d9bb9 »
2009-03-16 example.ini bugfixes and first trials of site traffic integration
208 db_table_inbox_account_comment = relation, account, comment, main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
209 db_table_inbox_account_message = relation, account, message, main
e6838895 »
2010-05-17 New Features
210 db_table_moderatorinbox = relation, subreddit, message, main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
211
212 db_table_report_account_link = relation, account, link, main
213 db_table_report_account_comment = relation, account, comment, comment
214 db_table_report_account_message = relation, account, message, main
215 db_table_report_account_subreddit = relation, account, subreddit, main
216
bf9f43cc »
2009-12-01 Messaging/commenting
217 db_table_award = thing, award
218 db_table_trophy = relation, account, award, award
219
e6838895 »
2010-05-17 New Features
220 db_table_jury_account_link = relation, account, link, main
221
a402d48d »
2010-05-03 New features:
222 db_table_ad = thing, main
223 db_table_adsr = relation, ad, subreddit, main
224
0dcddae2 »
2011-06-21 Add user "flair" for subreddits.
225 db_table_flair = relation, subreddit, account, main
226
bf9f43cc »
2009-12-01 Messaging/commenting
227 disallow_db_writes = False
1861a04e »
2008-08-22 fixed sorting issue where the global sorts were being overwritten. ad…
228
e6838895 »
2010-05-17 New Features
229
230 ## -- traffic analytics --
231 # google analytics token
232 googleanalytics =
233 # machine to get traffic metrics from
234 traffic_url = http://localhost:8010/tracker/pickle/
235 # secret used for talking to the traffic machine
236 tracking_secret = abcdefghijklmnopqrstuvwxyz0123456789
237
238
239 ## -- Self-service sponsored link stuff --
240 # (secure) payment domain
172f869e »
2011-11-08 Add an example subdomain for payment_domain in example.ini.
241 payment_domain = https://pay.reddit.local/
7fff900b »
2011-02-23 February 2011 Merge
242 ad_domain = http://reddit.local
243 allowed_pay_countries = United States, United Kingdom, Canada
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
244 sponsors =
7fff900b »
2011-02-23 February 2011 Merge
245
246 # authorize.net credentials (blank authorizenetapi to disable)
247 authorizenetapi =
248 # authorizenetapi = https://api.authorize.net/xml/v1/request.api
e6838895 »
2010-05-17 New Features
249 authorizenetname =
250 authorizenetkey =
7fff900b »
2011-02-23 February 2011 Merge
251
e6838895 »
2010-05-17 New Features
252 min_promote_bid = 20
253 max_promote_bid = 9999
254 min_promote_future = 2
255
256 # -- spreadshirt --
257 spreadshirt_url =
258 spreadshirt_vendor_id =
259 spreadshirt_min_font = 42
260 spreadshirt_max_width = 620
261 spreadshirt_test_font =
262
263
4778b17e »
2008-06-17 initial checkin
264 ###
265 # Other magic settings
266 ###
267
e6838895 »
2010-05-17 New Features
268 # list of cnames allowed to render as reddit.com without a frame
269 authorized_cnames =
4778b17e »
2008-06-17 initial checkin
270
e6838895 »
2010-05-17 New Features
271 # -- query cache settings --
272 num_query_queue_workers = 5
273 query_queue_worker = http://cslowe.local:8000
274 enable_doquery = True
7fff900b »
2011-02-23 February 2011 Merge
275 use_query_cache = True
e6838895 »
2010-05-17 New Features
276 write_query_queue = True
1861a04e »
2008-08-22 fixed sorting issue where the global sorts were being overwritten. ad…
277
e6838895 »
2010-05-17 New Features
278 # -- stylesheet editor --
279 # disable custom stylesheets
280 css_killswitch = False
281 # list of "trusted" domains that can be referenced in url()
282 allowed_css_linked_domains = static.reddit.com, www.reddit.com, reallystatic.reddit.com
283 # max number of uploaded images per subreddit
284 max_sr_images = 50
285 # default stylesheet and it's rtl version
4778b17e »
2008-06-17 initial checkin
286 stylesheet = reddit.css
e6838895 »
2010-05-17 New Features
287 stylesheet_rtl = reddit-rtl.css
288 # location of the static directory
289 static_path = /static/
50a5daa6 »
2011-10-19 Allow static files to be served from other domains.
290 # if set, these are the domains used for static files served over http and https
291 # if not set, no domain will be specified
292 static_domain =
293 static_secure_domain =
294 # if this is true, append .gz to CSS and JS files served from the static domain
295 # this is for hosts that don't do on-the-fly gzipping (e.g. s3)
296 static_pre_gzipped = false
297 static_secure_pre_gzipped = false
4778b17e »
2008-06-17 initial checkin
298
7fff900b »
2011-02-23 February 2011 Merge
299 # make frontpage 100% dart
300 frontpage_dart = false
301
e6838895 »
2010-05-17 New Features
302 # -- translator UI --
303 # enable/disable access to the translation UI in /admin/i18n
304 translator = true
305 # reddit runs the translator UI on a different instance with a
306 # password to login. These settings are used when generating messages
307 # to translators to tell them their credentials
308 translator_username =
309 translator_password =
6bcef003 »
2008-08-26 1. Allow a reddit to have a cname, like www.proggit.com, that renders
310
e6838895 »
2010-05-17 New Features
311 # subreddit used for DMCA takedowns
5ef76b96 »
2010-05-03 New features:
312 takedown_sr = _takedowns
e6838895 »
2010-05-17 New Features
313 # png compressor
314 png_optimizer = /usr/bin/env optipng
4778b17e »
2008-06-17 initial checkin
315
e6838895 »
2010-05-17 New Features
316 # -- search --
317 # where is solor?
318 solr_url =
319 # how long do we cache search results (in seconds)
f6fbb05a »
2009-02-27 Cache solr query results for a short time. Speeds up domain listings …
320 solr_cache_time = 300
4778b17e »
2008-06-17 initial checkin
321
e6838895 »
2010-05-17 New Features
322 # Just a list of words. Used by errlog.py to make up names for new errors.
323 words_file = /usr/dict/words
2869eaf8 »
2010-05-03 New features:
324
e6838895 »
2010-05-17 New Features
325 # -- media stuff --
326 # user agent for the scraper
327 useragent = Mozilla/5.0 (compatible; redditbot/1.0; +http://www.reddit.com/feedback)
4653c16a »
2011-10-25 Split thumbnails and sr images across multiple buckets.
328
329 # The storage method to use for media
330 # Options:
331 # s3 - Uses Amazon S3 to upload media to buckets
332 media_store = s3
333
e6838895 »
2010-05-17 New Features
334 # your s3 credentials
335 S3KEY_ID =
336 S3SECRET_KEY =
4653c16a »
2011-10-25 Split thumbnails and sr images across multiple buckets.
337
338 # This bucket is used for old media, new installs may leave this blank
339 s3_old_thumb_bucket =
340
341 # May be one bucket, or many buckets seperated by commas
342 s3_media_buckets =
343
344 # Store direct urls for images, rather than buckets
345 # For the bucket mybucket with the image helloworld.jpg the stored url would be:
346 # true: http://s3.amazonaws.com/mybucket/helloworld.jpg
347 # false: http://mybucket/helloworld.jpg
348 s3_media_direct = true
349
e6838895 »
2010-05-17 New Features
350 media_domain = localhost
4b9fee79 »
2011-08-02 Use an API key for the embed.ly API.
351 # Embedly API Key
352 embedly_api_key =
4778b17e »
2008-06-17 initial checkin
353
e6838895 »
2010-05-17 New Features
354 # -- limits --
355 # rate limiter duration (minutes)
356 RATELIMIT = 10
357 # minimum display karma
358 MIN_UP_KARMA = 1
359 MIN_RATE_LIMIT_KARMA = 10
360 MIN_RATE_LIMIT_COMMENT_KARMA = 1
361 QUOTA_THRESHOLD = 5
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
362 # Links and comments older than this many days qualify for historic preservation
363 REPLY_AGE_LIMIT = 180
68a06c56 »
2011-04-14 April 2011 Merge
364 # Links and comments older than this many days can't be voted on
365 VOTE_AGE_LIMIT = 180
63d518f4 »
2010-11-06 Make min age for subreddit creation configurable.
366 # minimum age, in days, of an account to be eligible to create a community
367 min_membership_create_community = 30
4778b17e »
2008-06-17 initial checkin
368
e6838895 »
2010-05-17 New Features
369 # min amount of karma to edit
370 WIKI_KARMA = 100
2de837f5 »
2009-05-06 New help system and footer
371
4778b17e »
2008-06-17 initial checkin
372 # time in days
373 MODWINDOW = 2
e6838895 »
2010-05-17 New Features
374 HOT_PAGE_AGE = 1000
4778b17e »
2008-06-17 initial checkin
375
e6838895 »
2010-05-17 New Features
376 # -- display options --
377 # how long to consider links eligible for the rising page
bcca862e »
2008-07-02 add media features
378 rising_period = 12 hours
e6838895 »
2010-05-17 New Features
379 # max number of comments (default)
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
380 num_comments = 100
381 # max number of comments (non-gold)
4778b17e »
2008-06-17 initial checkin
382 max_comments = 500
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
383 # max number of comments (gold)
384 max_comments_gold = 2500
e6838895 »
2010-05-17 New Features
385 # list of reddits to auto-subscribe users to
386 automatic_reddits =
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
387 # special reddit that only reddit gold subscribers can use
388 lounge_reddit =
e6838895 »
2010-05-17 New Features
389 # cutoff number of reddits to show unsubscribed users
0745f5bf »
2009-05-13 make 1/2 of the default reddits English reddits if the user hasn't se…
390 num_default_reddits = 10
e6838895 »
2010-05-17 New Features
391 # how deep do we go into the top listing when fetching /random
392 num_serendipity = 250
852b989f »
2009-07-16 srbar updates
393 sr_dropdown_threshold = 15
4778b17e »
2008-06-17 initial checkin
394
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
395 # Conflate visits to a comment page that happen within this many
396 # seconds of each other
397 comment_visits_period = 600
398
e6838895 »
2010-05-17 New Features
399 #user-agents to rate-limit
4778b17e »
2008-06-17 initial checkin
400 agents =
401
e6838895 »
2010-05-17 New Features
402 # -- email --
403 # smtp server
404 smtp_server = localhost
405 # delay before allowing a link to be shared
406 new_link_share_delay = 30 seconds
407 # alerter emails
408 nerds_email = nerds@reddit.com
409 # share reply email
410 share_reply = noreply@reddit.com
411 # feedback email
412 feedback_email = reddit@gmail.com
7ce107f2 »
2008-07-17 sharing
413
51bcbfbc »
2011-06-16 Method _key_from_url() now returns case sensitive results for special…
414 # Special case sensitive domains
415 case_sensitive_domains = i.imgur.com, youtube.com
416
4778b17e »
2008-06-17 initial checkin
417 [server:main]
418 use = egg:Paste#http
419 host = 0.0.0.0
e6838895 »
2010-05-17 New Features
420 port = %(http_port)s
4778b17e »
2008-06-17 initial checkin
421
422 [app:main]
423 use = egg:r2
424 cache_dir = %(here)s/data
425 beaker.session_key = r2
426 beaker.session_secret = somesecret
427 #lang = en
428
429 # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
430 # Debug mode will enable the interactive debugging tool, allowing ANYONE to
431 # execute malicious code after an exception is raised.
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
432 #set debug = false
4778b17e »
2008-06-17 initial checkin
433
4653c16a »
2011-10-25 Split thumbnails and sr images across multiple buckets.
434
Something went wrong with that request. Please try again.