Skip to content
This repository
Newer
Older
100644 392 lines (326 sloc) 11.454 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
e6838895 »
2010-05-17 New Features
11 # enables/disables template caching (for development)
4778b17e »
2008-06-17 initial checkin
12 template_debug = true
e6838895 »
2010-05-17 New Features
13 # use uncompressed static files (out of /static/js and /static/css)
14 # rather than compressed files out of /static (for development if true)
4778b17e »
2008-06-17 initial checkin
15 uncompressedJS = true
e6838895 »
2010-05-17 New Features
16 # enable/disable verbose SQL printing
9813d947 »
2009-04-29 Make reddit compatible with Postgres 8.3 and Python 2.6
17 sqlprinting = false
e6838895 »
2010-05-17 New Features
18 # enable/disable writing errors as they occur to a rabbit-mq queue
a402d48d »
2010-05-03 New features:
19 exception_logging = false
e6838895 »
2010-05-17 New Features
20 # whether to print a "reddit app started" message at start"
5ef76b96 »
2010-05-03 New features:
21 log_start = true
e6838895 »
2010-05-17 New Features
22 # enable/disable logging for amqp/rabbitmq
23 amqp_logging = false
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
24 # emergency measures: makes the site read only
25 read_only_mode = false
68a06c56 »
2011-04-14 April 2011 Merge
26 # global switch for wiki write permissions
27 allow_wiki_editing = true
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
28
e6838895 »
2010-05-17 New Features
29 # -- SECRETS! <-- update these first! --
30 # global secret
31 SECRET = abcdefghijklmnopqrstuvwxyz0123456789
32 # secret for making the modhash
33 MODSECRET = abcdefghijklmnopqrstuvwxyz0123456789
34 # secret for /prefs/feeds
35 FEEDSECRET = abcdefghijklmnopqrstuvwxyz0123456789
5ef76b96 »
2010-05-03 New features:
36
7fff900b »
2011-02-23 February 2011 Merge
37 INDEXTANK_API_URL =
38
d411cd55 »
2010-11-06 Added support for disabling adds via config file
39 # -- feature toggles --
40 disable_ads = false
41
e6838895 »
2010-05-17 New Features
42 # -- important settings --
43 # the domain that this app serves itself up as
7fff900b »
2011-02-23 February 2011 Merge
44 domain = reddit.local
68a06c56 »
2011-04-14 April 2011 Merge
45 # the short domain (like redd.it)
46 shortdomain =
e6838895 »
2010-05-17 New Features
47 # if you use www for the old-timey feel, put it here
48 domain_prefix =
49 # the user used for "system" operations and messages
50 system_user = reddit
51 # list of admin accounts
52 admins = reddit
53 # the default subreddit for submissions
54 default_sr = reddit.com
55
56 # time for the page cache (for unlogged in users)
57 page_cache_time = 90
58
59 # default localization for strings (when using python's locale.format)
60 locale = C
61 # default site language (two letter character code)
62 lang = en
63 # if your webserver is a proxy and on a different instance, use
64 # X-forwarded-for and set this to the webserver's IP
4778b17e »
2008-06-17 initial checkin
65 proxy_addr =
e6838895 »
2010-05-17 New Features
66 # hash for validating HTTP_TRUE_CLIENT_IP_HASH
67 ip_hash =
68 # timezone for storing
69 timezone = UTC
70 # timezone for the database
71 display_timezone = MST
72 # secret key for accessing /shutdown
73 shutdown_secret = 12345
74 # list of servers that the service monitor will care about
75 monitored_servers = reddit, localhost
76 # name of the cookie to drop with login information
77 login_cookie = reddit_session
78
79 # set to a path to enable per-request logging
4778b17e »
2008-06-17 initial checkin
80 log_path =
e6838895 »
2010-05-17 New Features
81 # fraction of requests to pass into the queue-based usage sampler
82 usage_sampling = 0.
4778b17e »
2008-06-17 initial checkin
83
e6838895 »
2010-05-17 New Features
84 # account used for default feedback messaging (can be #subreddit)
85 admin_message_acct = reddit
86
87
88 # -- caching options --
89 # data cache (used for caching Thing objects)
90 num_mc_clients = 5
4778b17e »
2008-06-17 initial checkin
91 memcaches = 127.0.0.1:11211
7fff900b »
2011-02-23 February 2011 Merge
92 stalecaches =
e6838895 »
2010-05-17 New Features
93 # render caches (the second is "remote" and the local is optional but in the same format)
94 local_rendercache =
ae6ba7a7 »
2008-12-16 added a separate set of memcaches for the render cache
95 rendercaches = 127.0.0.1:11211
e6838895 »
2010-05-17 New Features
96 # cache for storing service monitor information
97 servicecaches = 127.0.0.1:11211
bf9f43cc »
2009-12-01 Messaging/commenting
98
67814d54 »
2010-05-03 Features:
99 # -- permacache options --
100 # permacache is memcaches -> cassanda -> memcachedb
101 # memcaches that sit in front of cassandra
102 permacache_memcaches = 127.0.0.1:11211
103 # cassandra hosts. one of these will be chosen at random by pycassa
9a4271f6 »
2010-06-15 Upgrade Instructions
104 cassandra_seeds = 127.0.0.1:9160
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
105 # read/write consistency levels for Cassandra
106 cassandra_rcl = ONE
7fff900b »
2011-02-23 February 2011 Merge
107 cassandra_wcl = ONE
bf9f43cc »
2009-12-01 Messaging/commenting
108
e6838895 »
2010-05-17 New Features
109 # -- url cache options --
110 url_caches = 127.0.0.1:11211
111 # cassandra hosts. one of these will be chosen at random by pycassa
112 url_seeds =
113
114
115 # caches for storing number of times a link is rendered
116 incr_cache = udp:localhost:11211
117 incr_caches = localhost:11211
118 # recommender cache (depricated)
119 rec_cache = 127.0.0.1:11211
120
121 ## -- traffic tracking urls --
122 # image to render to track pageviews
123 tracker_url = /static/pixel.png
124 # images to render to track sponsored links
125 adtracker_url = /static/pixel.png
126 # image to render to track the ad frame
127 adframetracker_url = http://pixel.reddit.com/pixel/of_defenestration.png
128 # open redirector to bounce clicks off of on sponsored links for tracking
129 clicktracker_url = /static/pixel.png
7fff900b »
2011-02-23 February 2011 Merge
130 # new pixel
131 newtracker_url =
e6838895 »
2010-05-17 New Features
132
133 # amqp
bf9f43cc »
2009-12-01 Messaging/commenting
134 amqp_host = localhost:5672
e6838895 »
2010-05-17 New Features
135 amqp_user = reddit
136 amqp_pass = reddit
bf9f43cc »
2009-12-01 Messaging/commenting
137 amqp_virtual_host = /
138
e6838895 »
2010-05-17 New Features
139 ## -- database setup --
140 # list of all databases named in the subsequent table
141 databases = main, comment, vote, email, authorize, award, hc
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
142
7fff900b »
2011-02-23 February 2011 Merge
143 db_user = reddit
144 db_pass = password
145 db_port = 5432
146 db_pool_size = 3
147 db_pool_overflow_size = 3
148
149 #db name db host user, pass, port, conn, overflow_conn
150 main_db = reddit, 127.0.0.1, *, *, *, *, *
151 comment_db = reddit, 127.0.0.1, *, *, *, *, *
152 comment2_db = reddit, 127.0.0.1, *, *, *, *, *
153 vote_db = reddit, 127.0.0.1, *, *, *, *, *
154 email_db = reddit, 127.0.0.1, *, *, *, *, *
155 authorize_db = reddit, 127.0.0.1, *, *, *, *, *
156 award_db = reddit, 127.0.0.1, *, *, *, *, *
157 hc_db = reddit, 127.0.0.1, *, *, *, *, *
e6838895 »
2010-05-17 New Features
158
7fff900b »
2011-02-23 February 2011 Merge
159 hardcache_categories = *:hc:hc
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
160
e6838895 »
2010-05-17 New Features
161 # this setting will prefix all of the table names
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
162 db_app_name = reddit
e6838895 »
2010-05-17 New Features
163 # are we allowed to create tables?
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
164 db_create_tables = True
165
166 type_db = main
167 rel_type_db = main
5ef76b96 »
2010-05-03 New features:
168 hardcache_db = main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
169
170 db_table_link = thing, main, main
171 db_table_account = thing, main
172 db_table_message = thing, main
173
174 db_table_savehide = relation, account, link, main
175 db_table_click = relation, account, link, main
176
177 db_table_comment = thing, comment
178 db_table_subreddit = thing, comment
179
180 db_table_srmember = relation, subreddit, account, comment
181
182 db_table_friend = relation, account, account, comment
183
184 db_table_vote_account_link = relation, account, link, vote
185 db_table_vote_account_comment = relation, account, comment, vote
186
780d9bb9 »
2009-03-16 example.ini bugfixes and first trials of site traffic integration
187 db_table_inbox_account_comment = relation, account, comment, main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
188 db_table_inbox_account_message = relation, account, message, main
e6838895 »
2010-05-17 New Features
189 db_table_moderatorinbox = relation, subreddit, message, main
2a5f891a »
2009-01-28 Moved database configuration from databases.py to the ini.
190
191 db_table_report_account_link = relation, account, link, main
192 db_table_report_account_comment = relation, account, comment, comment
193 db_table_report_account_message = relation, account, message, main
194 db_table_report_account_subreddit = relation, account, subreddit, main
195
bf9f43cc »
2009-12-01 Messaging/commenting
196 db_table_award = thing, award
197 db_table_trophy = relation, account, award, award
198
e6838895 »
2010-05-17 New Features
199 db_table_jury_account_link = relation, account, link, main
200
a402d48d »
2010-05-03 New features:
201 db_table_ad = thing, main
202 db_table_adsr = relation, ad, subreddit, main
203
bf9f43cc »
2009-12-01 Messaging/commenting
204 disallow_db_writes = False
1861a04e »
2008-08-22 fixed sorting issue where the global sorts were being overwritten. ad…
205
e6838895 »
2010-05-17 New Features
206
207 ## -- traffic analytics --
208 # google analytics token
209 googleanalytics =
210 # machine to get traffic metrics from
211 traffic_url = http://localhost:8010/tracker/pickle/
212 # secret used for talking to the traffic machine
213 tracking_secret = abcdefghijklmnopqrstuvwxyz0123456789
214
215
216 ## -- Self-service sponsored link stuff --
217 # (secure) payment domain
7fff900b »
2011-02-23 February 2011 Merge
218 payment_domain = http://reddit.local/
219 ad_domain = http://reddit.local
220 allowed_pay_countries = United States, United Kingdom, Canada
253c4730 »
2010-05-17 * Add services and scripts to public repos for ease of reddit instal…
221 sponsors =
7fff900b »
2011-02-23 February 2011 Merge
222
223 # authorize.net credentials (blank authorizenetapi to disable)
224 authorizenetapi =
225 # authorizenetapi = https://api.authorize.net/xml/v1/request.api
e6838895 »
2010-05-17 New Features
226 authorizenetname =
227 authorizenetkey =
7fff900b »
2011-02-23 February 2011 Merge
228
e6838895 »
2010-05-17 New Features
229 min_promote_bid = 20
230 max_promote_bid = 9999
231 min_promote_future = 2
232
233 # -- spreadshirt --
234 spreadshirt_url =
235 spreadshirt_vendor_id =
236 spreadshirt_min_font = 42
237 spreadshirt_max_width = 620
238 spreadshirt_test_font =
239
240
4778b17e »
2008-06-17 initial checkin
241 ###
242 # Other magic settings
243 ###
244
e6838895 »
2010-05-17 New Features
245 # list of cnames allowed to render as reddit.com without a frame
246 authorized_cnames =
4778b17e »
2008-06-17 initial checkin
247
e6838895 »
2010-05-17 New Features
248 # -- query cache settings --
249 num_query_queue_workers = 5
250 query_queue_worker = http://cslowe.local:8000
251 enable_doquery = True
7fff900b »
2011-02-23 February 2011 Merge
252 use_query_cache = True
e6838895 »
2010-05-17 New Features
253 write_query_queue = True
1861a04e »
2008-08-22 fixed sorting issue where the global sorts were being overwritten. ad…
254
e6838895 »
2010-05-17 New Features
255 # -- stylesheet editor --
256 # disable custom stylesheets
257 css_killswitch = False
258 # list of "trusted" domains that can be referenced in url()
259 allowed_css_linked_domains = static.reddit.com, www.reddit.com, reallystatic.reddit.com
260 # max number of uploaded images per subreddit
261 max_sr_images = 50
262 # default stylesheet and it's rtl version
4778b17e »
2008-06-17 initial checkin
263 stylesheet = reddit.css
e6838895 »
2010-05-17 New Features
264 stylesheet_rtl = reddit-rtl.css
265 # location of the static directory
266 static_path = /static/
4778b17e »
2008-06-17 initial checkin
267
7fff900b »
2011-02-23 February 2011 Merge
268 # make frontpage 100% dart
269 frontpage_dart = false
270
e6838895 »
2010-05-17 New Features
271 # -- translator UI --
272 # enable/disable access to the translation UI in /admin/i18n
273 translator = true
274 # reddit runs the translator UI on a different instance with a
275 # password to login. These settings are used when generating messages
276 # to translators to tell them their credentials
277 translator_username =
278 translator_password =
6bcef003 »
2008-08-26 1. Allow a reddit to have a cname, like www.proggit.com, that renders
279
e6838895 »
2010-05-17 New Features
280 # subreddit used for DMCA takedowns
5ef76b96 »
2010-05-03 New features:
281 takedown_sr = _takedowns
e6838895 »
2010-05-17 New Features
282 # png compressor
283 png_optimizer = /usr/bin/env optipng
284 # bad words that should be *'d out
5ef76b96 »
2010-05-03 New features:
285 profanity_wordlist =
e6838895 »
2010-05-17 New Features
286 # which markdown backent to use (c = discount, py = markdown.py)
287 markdown_backend = c
4778b17e »
2008-06-17 initial checkin
288
e6838895 »
2010-05-17 New Features
289 # -- search --
290 # where is solor?
291 solr_url =
292 # 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 …
293 solr_cache_time = 300
4778b17e »
2008-06-17 initial checkin
294
e6838895 »
2010-05-17 New Features
295 # Just a list of words. Used by errlog.py to make up names for new errors.
296 words_file = /usr/dict/words
2869eaf8 »
2010-05-03 New features:
297
e6838895 »
2010-05-17 New Features
298 # -- media stuff --
299 # user agent for the scraper
300 useragent = Mozilla/5.0 (compatible; redditbot/1.0; +http://www.reddit.com/feedback)
301 # your s3 credentials
302 S3KEY_ID =
303 S3SECRET_KEY =
304 # s3 bucket
305 s3_thumb_bucket = test.your.domain.here
bcca862e »
2008-07-02 add media features
306 default_thumb = /static/noimage.png
08c431bd »
2010-05-28 * Comply with the spec on 304 errors so Chrome won't barf download.g…
307 self_thumb = /static/self_default2.png
e6838895 »
2010-05-17 New Features
308 media_domain = localhost
4778b17e »
2008-06-17 initial checkin
309
e6838895 »
2010-05-17 New Features
310 # -- limits --
311 # rate limiter duration (minutes)
312 RATELIMIT = 10
313 # minimum display karma
314 MIN_UP_KARMA = 1
315 MIN_RATE_LIMIT_KARMA = 10
316 MIN_RATE_LIMIT_COMMENT_KARMA = 1
317 QUOTA_THRESHOLD = 5
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
318 # Links and comments older than this many days qualify for historic preservation
319 REPLY_AGE_LIMIT = 180
68a06c56 »
2011-04-14 April 2011 Merge
320 # Links and comments older than this many days can't be voted on
321 VOTE_AGE_LIMIT = 180
63d518f4 »
2010-11-06 Make min age for subreddit creation configurable.
322 # minimum age, in days, of an account to be eligible to create a community
323 min_membership_create_community = 30
4778b17e »
2008-06-17 initial checkin
324
e6838895 »
2010-05-17 New Features
325 # min amount of karma to edit
326 WIKI_KARMA = 100
2de837f5 »
2009-05-06 New help system and footer
327
4778b17e »
2008-06-17 initial checkin
328 # time in days
329 MODWINDOW = 2
e6838895 »
2010-05-17 New Features
330 HOT_PAGE_AGE = 1000
4778b17e »
2008-06-17 initial checkin
331
e6838895 »
2010-05-17 New Features
332 # -- display options --
333 # how long to consider links eligible for the rising page
bcca862e »
2008-07-02 add media features
334 rising_period = 12 hours
e6838895 »
2010-05-17 New Features
335 # max number of comments (default)
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
336 num_comments = 100
337 # max number of comments (non-gold)
4778b17e »
2008-06-17 initial checkin
338 max_comments = 500
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
339 # max number of comments (gold)
340 max_comments_gold = 2500
e6838895 »
2010-05-17 New Features
341 # list of reddits to auto-subscribe users to
342 automatic_reddits =
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
343 # special reddit that only reddit gold subscribers can use
344 lounge_reddit =
e6838895 »
2010-05-17 New Features
345 # 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…
346 num_default_reddits = 10
e6838895 »
2010-05-17 New Features
347 # how deep do we go into the top listing when fetching /random
348 num_serendipity = 250
852b989f »
2009-07-16 srbar updates
349 sr_dropdown_threshold = 15
4778b17e »
2008-06-17 initial checkin
350
37e2ba98 »
2010-10-18 * Combine cassandra clusters into a single one
351 # Conflate visits to a comment page that happen within this many
352 # seconds of each other
353 comment_visits_period = 600
354
68a06c56 »
2011-04-14 April 2011 Merge
355 # Set this to a nonzero range and the server will restart after this many
356 # minutes have passed
357 LOGANS_RUN_LOW = 0
358 LOGANS_RUN_HIGH = 0
359
e6838895 »
2010-05-17 New Features
360 #user-agents to rate-limit
4778b17e »
2008-06-17 initial checkin
361 agents =
362
e6838895 »
2010-05-17 New Features
363 # -- email --
364 # smtp server
365 smtp_server = localhost
366 # delay before allowing a link to be shared
367 new_link_share_delay = 30 seconds
368 # alerter emails
369 nerds_email = nerds@reddit.com
370 # share reply email
371 share_reply = noreply@reddit.com
372 # feedback email
373 feedback_email = reddit@gmail.com
7ce107f2 »
2008-07-17 sharing
374
4778b17e »
2008-06-17 initial checkin
375 [server:main]
376 use = egg:Paste#http
377 host = 0.0.0.0
e6838895 »
2010-05-17 New Features
378 port = %(http_port)s
4778b17e »
2008-06-17 initial checkin
379
380 [app:main]
381 use = egg:r2
382 cache_dir = %(here)s/data
383 beaker.session_key = r2
384 beaker.session_secret = somesecret
385 #lang = en
386
387 # WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT*
388 # Debug mode will enable the interactive debugging tool, allowing ANYONE to
389 # execute malicious code after an exception is raised.
0ae8f2fb »
2010-07-21 21 Jul 2010 merge
390 #set debug = false
4778b17e »
2008-06-17 initial checkin
391
Something went wrong with that request. Please try again.