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