Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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