geoip: Ignore memcache errors
[reddit.git] / r2 / example.ini
blobbed0acfe74235aad04273f59c1c1be418642c0c9
1 # DO NOT EDIT THIS FILE
2 # This is a base template. To apply changes to your
3 # reddit instance, create a "myreddit.update" config
4 # file, then run 'make ini'. 'make ini' will combine
5 # this template with the myreddit.update file and create a
6 # 'myreddit.ini'. ('myreddit.update' is just an example;
7 # any name will do - e.g., 'foo.update' will create
8 # 'foo.ini')
10 [secrets]
11 # the tokens in this section are base64 encoded
12 # general purpose secret
13 SECRET = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
14 # secret for /prefs/feeds
15 FEEDSECRET = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
16 # used for authenticating admin API calls w/o cookie
17 ADMINSECRET = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
18 # used to securely authenticate websocket requests to sutro
19 websocket = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
20 # secret for validating the cdn-provided client ip
21 cdn_ip_verification =
22 # secret for authenticating private media embeds
23 media_embed = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
24 # secret for authenticating controller#action name
25 action_name = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
26 # secret for email notification one-click unsubscribe links
27 email_notifications = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
28 # secrets for communicating with Stripe (optional payment processor)
29 stripe_webhook =
30 stripe_public_key =
31 stripe_secret_key =
32 # secrets for communicating with Authorize.net (optional payment processor--
33 # must also set authorizenetapi to enable)
34 authorizenetname =
35 authorizenetkey =
36 # secret for communicating with Paypal (optional payment processor)
37 paypal_webhook =
38 # secret for communicating with Coinbase (optional payment processor)
39 coinbase_webhook =
40 # secret for communicating with RedditGifts (optional payment processor)
41 redditgifts_webhook =
42 # The campaign monitor API key for the newsletter
43 newsletter_api_key =
44 # event-collector key and secret
45 events_collector_key =
46 events_collector_secret =
47 events_collector_js_key =
48 events_collector_js_secret =
49 events_collector_test_js_key =
50 events_collector_test_js_secret =
51 # The API key for managing tickets on ZenDesk
52 zendesk_api_key =
53 # the user to use for managing tickets on ZenDesk
54 zendesk_user =
55 # The API key for submitting takedown notices to lumendatabase.org
56 lumendatabase_org_api_key =
57 # Facebook sharing app id
58 facebook_app_id =
59 # The API key for making calls to CloudFlare
60 cloudflare_api_key =
61 # The email address linked to the API key for CloudFlare
62 cloudflare_email_address =
63 # The API url to call to purge content from CloudFlare
64 cloudflare_email_address =
65 # The imgix-provided secret url-signing token
66 imgix_signing_token =
67 # secret for cache poisoning report MACs
68 cache_poisoning = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
69 # secret for hashing ad click urls
70 adserver_click_url_secret = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
71 # secret for generating hmac encoding the modmail email reply info
72 modmail_email_secret = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
73 # mailgun api key
74 mailgun_api_key =
75 # request signing
76 request_signature_secret = YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5
78 [DEFAULT]
79 ############################################ SITE-SPECIFIC OPTIONS
80 #### Appearance
81 # the site's tagline, used in the title and description
82 short_description = open source is awesome
83 # default site interface language (two letter character code)
84 site_lang = en
85 # default header image url
86 default_header_url = reddit.com.header.png
88 #### Domains
89 # the domain that this app expects to be accessed on
90 domain = reddit.local
91 # where third party media (embeds etc.) are hosted
92 # this should be different from `domain` for security
93 media_domain = %(domain)s
94 # the short domain (like redd.it)
95 shortdomain =
96 # if you use www for the old-timey feel, put it here
97 domain_prefix =
98 # subdomains that don't need special processing
99 reserved_subdomains = www, ssl, oauth
100 # subdomains that don't need special processing, and can't be part of `c.domain_prefix`.
101 # should be a subset of `reserved_subdomains`
102 ignored_subdomains = www, ssl, oauth
103 # subdomains that are not reddit instances
104 offsite_subdomains =
105 # https api endpoint (must be g.domain or a subdomain of g.domain)
106 https_endpoint =
107 # the domain for oauth-orized requests
108 oauth_domain =
109 # (secure) payment domain for self-serve ads
110 payment_domain = https://pay.reddit.local/
111 # base url where 300x250 ad units (sidebar) are hosted
112 ad_domain = http://reddit.local
113 # domain where sutro websocket server is hosted
114 websocket_host = %(domain)s
115 # domain to send stats to
116 stats_domain =
117 # URL to send event-collector events to
118 events_collector_url =
119 # URL to send test event-collector events to
120 events_collector_test_url =
122 #### Accounts and Subreddits
123 # the user used for "system" operations and private messages
124 system_user = reddit
125 # the default subreddit for submissions
126 default_sr = frontpage
127 # account used for default feedback messaging (can be /r/subreddit)
128 admin_message_acct = reddit
129 # subreddit used for DMCA takedowns
130 takedown_sr = takedowns
131 # subreddit used for trending subreddits postings. Ignored if blank.
132 trending_sr =
133 # list of subreddits to always include in a user's front page (unless they unsubscribe)
134 automatic_reddits =
135 # special subreddit that only reddit gold subscribers can use
136 lounge_reddit =
137 # subreddits that have subscribers hidden
138 hide_subscribers_srs =
139 # subreddit to use for beta testing
140 beta_sr = beta
141 # name of the promos subreddit.
142 promo_sr_name = promos
144 multi_icons = art and design, ask, books, business, cars, comics, cute animals, diy, entertainment, food and drink, funny, games, grooming, health, life advice, military, models pinup, music, news, philosophy, pictures and gifs, science, shopping, sports, style, tech, travel, unusual stories, video
146 #### Static Files
147 # if set, this is the domain used for static files served over http and https
148 # if not set, no domain will be specified and relative local URLs will be used instead
149 static_domain =
151 #### Ops
152 # if your webserver is a proxy and on a different instance on the same 10.0.0.0/8 network
153 # set X-forwarded-for and set this to true
154 trust_local_proxies = false
155 # Location (directory) for temp files for diff3 merging
156 # Empty will use python default for temp files
157 diff3_temp_location =
158 # which cdn provider to use; right now this is just used for getting an
159 # accurate client IP. options are:
160 # null - no cdn
161 # cloudflare - use cloudflare as configured for reddit.com
162 # or write your own!
163 cdn_provider = null
165 #### Analytics
166 # image to render to track pageviews
167 tracker_url = /pixel/of_destiny.png
168 # images to render to track sponsored links
169 adtracker_url = /pixel/of_doom.png
170 # image to render to track the ad frame
171 adframetracker_url = /pixel/of_defenestration.png
172 # image to render to track HTTPS cert compatibility (needs to be protocol-relative)
173 httpstracker_url =
174 # redirector to bounce clicks off of on sponsored links for tracking
175 clicktracker_url = /click
176 event_clicktracker_url = /event_click
177 # url to request to track interaction statistics
178 uitracker_url = /pixel/of_discovery.png
179 # embeds pixel tracking url
180 eventtracker_url = /pixel/of_delight.png
181 anon_eventtracker_url = /pixel/of_diversity.png
182 # google analytics token
183 googleanalytics =
184 # google analytics events sampling rate. Valid values are 1-100.
185 # See https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._setSampleRate
186 googleanalytics_sample_rate = 50
187 # google analytics token for gold
188 googleanalytics_gold =
189 # google analytics events sampling rate for gold. Valid values are 1-100.
190 googleanalytics_sample_rate_gold = 100
191 # secret used for signing information on the above tracking pixels
192 tracking_secret = abcdefghijklmnopqrstuvwxyz0123456789
193 # google tag manager container id
194 googletagmanager =
196 #### Wiki Pages
197 wiki_page_content_policy = contentpolicy
198 wiki_page_privacy_policy = privacypolicy
199 wiki_page_user_agreement = useragreement
200 wiki_page_registration_info = registration_info
201 wiki_page_gold_bottlecaps = gold_bottlecaps
202 wiki_page_stylesheets_everywhere =
204 #### ads
205 az_selfserve_priorities =
206 az_selfserve_network_id =
208 #### Feature toggles
209 disable_ads = false
210 disable_captcha = false
211 disable_ratelimit = false
212 disable_require_admin_otp = false
213 disable_wiki = false
214 # global kill switch for loggedout experiments
215 enable_loggedout_experiments = false
218 ############################################ DEBUG
219 # global debug flag -- displays pylons stacktrace rather than 500 page on error when true
220 # NOTE: a pylons stacktrace allows remote code execution. make sure this is false in prod.
221 debug = false
222 # enables/disables whitespace removal in rendered html
223 template_debug = false
224 # enables/disables compiled template caching and template file mtime checking
225 reload_templates = true
226 # use uncompressed static files (out of /static/js and /static/css)
227 # rather than compressed files out of /static (for development if true)
228 uncompressedJS = true
229 # enable/disable verbose logging of SQL queries
230 sqlprinting = false
231 # directory to write cProfile stats dumps to (disabled if not set)
232 profile_directory =
233 # template names to record render timings for
234 timed_templates = Reddit, Link, Comment, LinkListing, NestedListing, SubredditTopBar
237 ############################################ PLUGINS
238 # which plugins are enabled (they must be installed via setup.py first)
239 plugins =
241 ###### about
242 # set which subreddits the about page pulls its source data from
243 # make sure you create the subreddits as well, otherwise you'll get an error
244 about_sr_quotes = about_quotes
245 about_sr_images = about_images
246 # size limit on the about page slideshow
247 about_images_count = 50
248 about_images_min_score = 1
250 advertising_links_sr = advertising_links
251 wiki_page_selfserve_advertisers = advertising/advertisers
252 wiki_page_selfserve_content = advertising/content
253 wiki_page_selfserve_blurbs = advertising/blurbs
254 wiki_page_selfserve_quotes = advertising/quotes
255 wiki_page_selfserve_help = advertising/help
257 ###### liveupdate
258 # the domain the activity pixel is hosted on
259 liveupdate_pixel_domain = %(domain)s
260 # maximum number of outstanding invites an event can have
261 liveupdate_invite_quota = 5
263 ###### meatspace
264 # nothing!
266 mobile_auth_gild_clients = android123, ios123
267 # days
268 mobile_auth_gild_time = 90
269 mobile_auth_gild_message = 3 months
271 ############################################ LOGGING
272 # whether to print a "reddit app started" message at start
273 log_start = true
274 # enable/disable logging of exceptions and events via amqp/rabbitmq
275 amqp_logging = false
276 # exception reporter objects to give to ErrorMiddleware (see log.py)
277 error_reporters =
280 ############################################ METRICS
281 # where to send metrics
282 statsd_addr =
283 # how often to send them [0.0 - 1.0]
284 statsd_sample_rate = 1.0
285 # percentage of stats for sampling (0-100)
286 stats_sample_rate = 1
288 ############################################ EMAIL
289 # which email provider to use
290 # options are:
291 # null - no email
292 # mailgun - use mailgun as configured for reddit.com
293 # or write your own!
294 email_provider = null
295 mailgun_domains =
296 mailgun_api_base_url =
298 # modmails as emails feature
299 modmail_sender_email =
300 modmail_system_email =
301 modmail_email_domain =
303 ############################################ MEDIA STORAGE
304 # which backend provider to use for media (thumbnails, subreddit stylesheets,
305 # subreddit images, app icons). options are:
306 # s3 - use amazon s3
307 # filesystem - write to local filesystem
308 # or write your own!
309 media_provider = s3
311 # s3 provider
312 # your s3 credentials -- if these are left blank, we'll pass None to
313 # boto which will trigger it to look in various places, including instance
314 # metadata if on ec2, for credentials.
315 S3KEY_ID =
316 S3SECRET_KEY =
317 # May be one bucket, or many buckets seperated by commas
318 s3_media_buckets =
319 s3_image_buckets =
320 # Store direct urls for images, rather than buckets
321 # For the bucket mybucket with the image helloworld.jpg the stored url would be:
322 # true: http://{s3_media_domain}/mybucket/helloworld.jpg
323 # false: http://mybucket/helloworld.jpg
324 s3_media_direct = true
325 # Which S3 region to use
326 # If using the US region, the default is correct. Otherwise, use a region-specific
327 # endpoint as in http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
328 s3_media_domain = s3.amazonaws.com
330 # filesystem provider configuration
331 media_fs_root =
332 media_fs_base_url_http =
334 thumbnail_size = 70, 70
335 thumbnail_hidpi_scaling = 2
337 # The provider that handles on-the-fly resizing of images. Options:
338 # imgix
339 # no_op
340 image_resizing_provider = no_op
342 # Which domain to use to request imgix-processed files.
343 imgix_domain = imgix.example.com
344 # Whether to sign imgix urls.
345 imgix_signing = false
346 # registration captcha
347 captcha_provider = no_op
350 ############################################ EMERGENCY MODES
351 # emergency measures: makes the site read only
352 read_only_mode = false
353 # a modified read only mode used for cache shown during heavy load 503s
354 heavy_load_mode = false
355 # override default site language for things like pirate day
356 lang_override =
357 # enable/disable automatic creation of database tables/column families
358 db_create_tables = True
359 # are we allowed to write to databases at all?
360 disallow_db_writes = False
361 # disable custom subreddit stylesheets
362 css_killswitch = False
365 ############################################ SCRAPER
366 # user agent for the scraper
367 useragent = Mozilla/5.0 (compatible; redditbot/1.0; +http://www.reddit.com/feedback)
368 # Embedly API Key. if no key is provided, the scraper will only fetch thumbnails.
369 embedly_api_key =
370 # A tuple of what media_object types will automatically be displayed on comments view.
371 # Ex: liveupdate, custom
372 autoexpand_media_types = liveupdate
375 ############################################ NEWSLETTER
376 # The list ID within campaign monitor to be altering
377 newsletter_list_id =
379 ############################################ QUOTAS
380 # quota for various types of relations creatable in subreddits
381 sr_banned_quota = 10000
382 sr_muted_quota = 10000
383 sr_moderator_invite_quota = 10000
384 sr_contributor_quota = 10000
385 sr_wikibanned_quota = 10000
386 sr_wikicontributor_quota = 10000
387 sr_quota_time = 7200
388 sr_invite_limit = 25
389 # delay before allowing a link to be shared
390 new_link_share_delay = 30 seconds
391 # max number of uploaded images per subreddit
392 max_sr_images = 50
395 ############################################ RATELIMITS
396 # If true, send 429 responses on exceeded ratelimits
397 # If false, send headers only, but don't abort
398 # Only applies if tracking is enabled below
399 ENFORCE_RATELIMIT = false
401 # If true, store per-user request counts in ratelimits cache
402 RL_SITEWIDE_ENABLED = true
403 # How large of a burst window will users be allowed?
404 RL_RESET_MINUTES = 10
405 # What is the average request rate over the above time period?
406 RL_AVG_REQ_PER_SEC = 0.5
408 # Same as above, but configured separately for connections via OAuth
409 RL_OAUTH_SITEWIDE_ENABLED = true
410 RL_OAUTH_RESET_MINUTES = 10
411 RL_OAUTH_AVG_REQ_PER_SEC = 0.5
413 # same as above, but for failed login attempts per account
414 RL_LOGIN_AVG_PER_SEC = .1
415 # same as above, but for failed login attempts per unfamiliar ip address
416 RL_LOGIN_IP_AVG_PER_SEC = .1
417 # and email/PM shares
418 RL_SHARE_AVG_PER_SEC = .1
420 # user agent regexps to hard-ratelimit to a number of requests per ten second period
421 # example: user_agent_ratelimit_regexes = (?i)googlebot:10, (?i)appengine:2
422 user_agent_ratelimit_regexes =
424 # karma needed to avoid per-subreddit submission ratelimits
425 MIN_RATE_LIMIT_KARMA = 10
426 MIN_RATE_LIMIT_COMMENT_KARMA = 1
429 ############################################ THRESHOLDS
430 # if the user has positive total karma, their per-subreddit karma will default to this, else 0
431 MIN_UP_KARMA = 1
433 # minimum user karma total values to show to non-admins
434 link_karma_display_floor = 1
435 comment_karma_display_floor = -100
437 # age at which links/comments become "archived" and can no longer be voted on, replied to, or reported
438 ARCHIVE_AGE = 180 days
440 # the maximum amount of time we use memcache to hide that a vote hasn't been
441 # asynchronously processed yet.
442 vote_queue_grace_period = 1 hour
444 # minimum age of an account (in days) for the "create a subreddit" button to show
445 min_membership_create_community = 30
446 # maximum age (in days) of items eligible for display on normalized hot pages (frontpage, multis, etc.)
447 HOT_PAGE_AGE = 1000
448 # how long to consider links eligible for the rising page
449 rising_period = 12 hours
450 # default number of comments shown
451 num_comments = 100
452 # max number of comments to show at once
453 max_comments = 500
454 max_comments_gold = 2500
455 # max number of parents to walk up the tree while uncollapsing replies in Q&A
456 # sort mode
457 max_comment_parent_walk = 20
458 # how deep do we go into the top listing when fetching /random
459 num_serendipity = 250
460 # Conflate visits to a comment page that happen within this many
461 # seconds of each other (gold "new comments" feature)
462 comment_visits_period = 600
463 # Max number of mentions to extract per comment
464 butler_max_mentions = 3
465 # Number of days to keep recent wiki revisions for
466 wiki_keep_recent_days = 7
467 # Max number of bytes for wiki pages
468 wiki_max_page_length_bytes = 262144
469 # Max wiki page name length
470 wiki_max_page_name_length = 128
471 # Max number of separators in a wiki page name
472 wiki_max_page_separators = 3
475 ############################################ SEARCH
476 # search provider name
477 search_provider = cloudsearch
479 # endpoint for link search
480 CLOUDSEARCH_SEARCH_API =
481 # endpoint for link upload
482 CLOUDSEARCH_DOC_API =
483 # endpoint for subreddit search
484 CLOUDSEARCH_SUBREDDIT_SEARCH_API =
485 # endpoint for subreddit upload
486 CLOUDSEARCH_SUBREDDIT_DOC_API =
488 ############################################ MEMCACHE
489 num_mc_clients = 5
490 # core memcache cluster, Things and various other stuff
491 memcaches = 127.0.0.1:11211
492 # caches used for @memoize decorator magic
493 memoizecaches = 127.0.0.1:11211
494 # hosts to store memcache-based locks on
495 lockcaches = 127.0.0.1:11211
496 # hosts to store rendered template fragments in
497 rendercaches = 127.0.0.1:11211
498 # hosts to store entire rendered pages in
499 pagecaches = 127.0.0.1:11211
500 # hosts that cache permacache cassandra data
501 permacache_memcaches = 127.0.0.1:11211
502 # hosts that cache srmember rels (subset of Thing data)
503 srmembercaches = 127.0.0.1:11211
504 # hosts that cache relations between Things
505 relcaches = 127.0.0.1:11211
506 # a local cache that's not globally consistent and can have stale data (optional)
507 stalecaches =
508 # cache for tracking rate limit thresholds
509 ratelimitcaches = 127.0.0.1:11211
510 # hosts to store hardcache data
511 hardcache_memcaches = 127.0.0.1:11211
514 ############################################ MCROUTER
515 mcrouter_addr = 127.0.0.1:5050
518 ############################################ MISCELLANEOUS
519 # default localization for strings (when using python's locale.format)
520 # (mostly replaced by babel, this shouldn't be necessary to change)
521 locale = C
522 # storage timezone, should probably not be changed from UTC
523 timezone = UTC
524 # timezone for display of some data, deprecated
525 display_timezone = MST
526 # location of the static directory
527 static_path = /static/
528 # Just a list of words. Used by errorlog.py to make up names for new errors.
529 words_file = /usr/dict/words
530 # domains that we consider URLs case sensitive for repost detection purposes
531 case_sensitive_domains = i.imgur.com, youtube.com
532 # Domains that we know are friendly and host raw image files
533 known_image_domains = i.imgur.com, giant.gfycat.com, pbs.twimg.com, upload.wikimedia.org
534 # whether to load reddit private code (a hack until we structure it better)
535 import_private = false
536 # location of geoip service
537 geoip_location = http://127.0.0.1:5000
538 # account name that AutoModerator actions will be done by
539 automoderator_account =
540 # Which scheme to use for URLs when the current protocol isn't known
541 default_scheme = http
544 ############################################ AUTHENTICATION
545 # how to authenticate users. options are:
546 # cookie: standard cookie-based auth
547 # http: http basic authentication
548 # or write your own!
549 authentication_provider = cookie
550 # the work factor for bcrypt, increment this every time computers double in
551 # speed. don't worry, changing this won't break old passwords
552 bcrypt_work_factor = 12
553 # name of the cookie to drop with login information
554 login_cookie = reddit_session
555 # name of the admin cookie
556 admin_cookie = reddit_admin
557 # name of the otp cookie
558 otp_cookie = reddit_otp
559 # the maximum life of an admin cookie (seconds)
560 ADMIN_COOKIE_TTL = 32400
561 # the maximum amount of idle time for an admin cookie (seconds)
562 ADMIN_COOKIE_MAX_IDLE = 900
563 # the maximum life of an otp cookie
564 OTP_COOKIE_TTL = 604800
565 # funky app user agents exempt from the login CSRF prevention
566 exempt_login_user_agents =
567 # for the http provider:
568 # should we trust the authorization header and auto-register accounts?
569 auth_trust_http_authorization = false
572 ############################################ CASSANDRA
573 # cassandra hosts
574 cassandra_seeds = 127.0.0.1:9160
575 # number of connections to keep open to the cassandra ring
576 cassandra_pool_size = 5
577 # default read/write consistency levels for Cassandra
578 cassandra_rcl = ONE
579 cassandra_wcl = ONE
580 # name of default connection pool to use when _connection_pool not specified
581 cassandra_default_pool = main
584 ############################################ AMQP
585 amqp_host = localhost:5672
586 amqp_user = reddit
587 amqp_pass = reddit
588 amqp_virtual_host = /
591 ############################################ ZOOKEEPER
592 # zookeeper is optional at the moment
593 zookeeper_connection_string = localhost:2181
594 zookeeper_username = reddit
595 zookeeper_password = reddit
597 # these should be one of "config" or "zookeeper"
598 # - config: read from the local ini file
599 # - zookeeper: read from the zookeeper cluster
600 liveconfig_source = config
601 secrets_source = config
604 ############################################ EMAIL
605 smtp_server = localhost
606 # where to send alerts for exceptions, etc.
607 nerds_email = nerds@reddit.com
608 # the "from" address for link share emails
609 share_reply = noreply@reddit.com
610 # where to send feedback comments
611 feedback_email = reddit@gmail.com
612 # the "from" address for orangered notifications
613 notification_email = notifications@example.com
614 # email to ads team
615 ads_email = ad-ops@reddit.com
617 ############################################ POSTGRES
618 db_user = reddit
619 db_pass = password
620 db_port = 5432
621 db_pool_size = 3
622 db_pool_overflow_size = 3
624 # list of all databases named in the subsequent table
625 databases = main, comment, email, authorize, award, hc, traffic
627 #db name db host user, pass, port, conn, overflow_conn
628 main_db = reddit, 127.0.0.1, *, *, *, *, *
629 comment_db = reddit, 127.0.0.1, *, *, *, *, *
630 comment2_db = reddit, 127.0.0.1, *, *, *, *, *
631 email_db = reddit, 127.0.0.1, *, *, *, *, *
632 authorize_db = reddit, 127.0.0.1, *, *, *, *, *
633 award_db = reddit, 127.0.0.1, *, *, *, *, *
634 hc_db = reddit, 127.0.0.1, *, *, *, *, *
635 traffic_db = reddit, 127.0.0.1, *, *, *, *, *
637 hardcache_categories = *:hc:hc
639 # this setting will prefix all of the table names
640 db_app_name = reddit
642 type_db = main
643 rel_type_db = main
644 hardcache_db = main
646 # definitions of what each table is (probably shouldn't change in .update files)
647 # things require no extra info. relation is followed by the names of the related tables
648 # a !typeid=# flag allows overriding of the type id for a thing/rel to avoid the db
649 # hit on app startup.
650 db_table_link = thing
651 db_table_account = thing
652 db_table_message = thing
653 db_table_comment = thing
654 db_table_subreddit = thing
655 db_table_srmember = relation, subreddit, account
656 db_table_friend = relation, account, account
657 db_table_inbox_account_comment = relation, account, comment
658 db_table_inbox_account_message = relation, account, message
659 db_table_moderatorinbox = relation, subreddit, message
660 db_table_report_account_link = relation, account, link
661 db_table_report_account_comment = relation, account, comment
662 db_table_report_account_message = relation, account, message
663 db_table_report_account_subreddit = relation, account, subreddit
664 db_table_award = thing
665 db_table_trophy = relation, account, award
666 db_table_jury_account_link = relation, account, link
667 db_table_flair = relation, subreddit, account
668 db_table_promocampaign = thing
670 # which servers to find each table on (likely to change in .update files)
671 # first server listed is assumed to be the master, all others are read-only slaves
672 # additionally, a "!avoid_master" flag may be added to specify that reads should use the slaves
673 db_servers_link = main, main
674 db_servers_account = main
675 db_servers_message = main
676 db_servers_comment = comment
677 db_servers_subreddit = comment
678 db_servers_srmember = comment
679 db_servers_friend = comment
680 db_servers_inbox_account_comment = main
681 db_servers_inbox_account_message = main
682 db_servers_moderatorinbox = main
683 db_servers_report_account_link = main
684 db_servers_report_account_comment = comment
685 db_servers_report_account_message = main
686 db_servers_report_account_subreddit = main
687 db_servers_award = award
688 db_servers_trophy = award
689 db_servers_jury_account_link = main
690 db_servers_ad = main
691 db_servers_adsr = main
692 db_servers_flair = main
693 db_servers_promocampaign = main
696 ############################################ GOLD
697 goldpayment_email =
698 # "thanks for subscribing to reddit gold" return address
699 goldsupport_email =
701 gold_month_price = 3.99
702 gold_year_price = 29.99
704 PAYPAL_BUTTONID_ONETIME_BYMONTH =
705 PAYPAL_BUTTONID_ONETIME_BYYEAR =
706 PAYPAL_BUTTONID_AUTORENEW_BYMONTH =
707 PAYPAL_BUTTONID_AUTORENEW_BYYEAR =
708 PAYPAL_BUTTONID_CREDDITS_BYMONTH =
709 PAYPAL_BUTTONID_CREDDITS_BYYEAR =
710 PAYPAL_BUTTONID_GIFTCODE_BYMONTH =
711 PAYPAL_BUTTONID_GIFTCODE_BYYEAR =
712 STRIPE_MONTHLY_GOLD_PLAN =
713 STRIPE_YEARLY_GOLD_PLAN =
714 COINBASE_BUTTONID_ONETIME_1MO =
715 COINBASE_BUTTONID_ONETIME_3MO =
716 COINBASE_BUTTONID_ONETIME_1YR =
717 COINBASE_BUTTONID_ONETIME_2YR =
718 COINBASE_BUTTONID_ONETIME_3YR =
720 adzerk_url =
721 gold_hostname_file =
723 ############################################ SELF-SERVE ADS
724 selfserve_support_email = selfservesupport@mydomain.com
725 MAX_CAMPAIGNS_PER_LINK = 100
726 cpm_selfserve = 1.50
727 cpm_selfserve_geotarget_metro = 5.00
728 cpm_selfserve_geotarget_country = 2.00
729 cpm_selfserve_collection = 1.50
730 authorizenetapi =
731 default_total_budget_pennies = 10000
732 min_total_budget_pennies = 500
733 max_total_budget_pennies = 999900
734 default_bid_pennies = 150
735 min_bid_pennies = 75
736 max_bid_pennies = 1000
737 adserver_click_domain =
738 authnet_validate = true
739 # Define versions for mobile OS platform
740 ios_versions = 2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 6.0, 6.1, 7.0, 7.1, 8.0, 8.1, 8.2, 8.3, 8.4
741 android_versions = 1.5, 1.6, 2.1, 2.2, 2.3, 3.0, 4.0, 4.1, 4.2, 4.3, 4.4, 5.0, 5.1
742 frequency_cap_min = 3
743 frequency_cap_default = 3
746 ############################################ TRAFFIC
747 TRAFFIC_ACCESS_KEY =
748 TRAFFIC_SECRET_KEY =
749 RAW_LOG_DIR =
750 PROCESSED_DIR =
751 AGGREGATE_DIR =
752 AWS_LOG_DIR =
753 TRAFFIC_SRC_DIR =
754 TRAFFIC_LOG_HOSTS =
756 ############################################ TRAFFIC EMR ROLE
757 emr_trafic_job_flow_role = EMR_EC2_DefaultRole
758 emr_traffic_service_role = EMR_DefaultRole
759 emr_traffic_tags =
761 ############################################ PERFORMANCE / SCALING
762 # should we split link votes into separate queues based on subreddit id?
763 # this helps with lock contention but isn't necessary on smaller sites
764 shard_link_vote_queues = false
765 # should we split comment tree processing into shards based on the link id?
766 # this helps with lock contention but isn't necessary on smaller sites
767 shard_commentstree_queues = false
768 # chance of a write to the query cache triggering pruning. increasing this will
769 # potentially slow down writes, but will keep the size of cached queries in check better
770 querycache_prune_chance = 0.05
771 # time for the page cache (for unlogged in users)
772 page_cache_time = 90
773 # time for the comment pane cache (for a subset of logged in users, see pages.py:CommentPane)
774 commentpane_cache_time = 120
777 ############################################ SERVICES
778 ###### activity
779 activity_endpoint = localhost:9002
782 [server:main]
783 use = egg:Paste#http
784 host = 0.0.0.0
785 port = %(http_port)s
787 [filter:gzip]
788 use = egg:r2#gzip
789 compress_level = 6
790 min_size = 800
792 [app:main]
793 use = egg:r2
794 cache_dir = %(here)s/data
796 [loggers]
797 keys = root
799 [logger_root]
800 level = WARNING
801 handlers = console
803 [handlers]
804 keys = console
806 [handler_console]
807 class = StreamHandler
808 args = (sys.stdout,)
810 [formatters]
811 keys = reddit
813 [formatter_reddit]
814 format = %(message)s
816 # the following configuration section makes up the "live" config. if zookeeper
817 # is enabled, then this configuration will be found by the app in zookeeper. to
818 # write it to zookeeper, use the writer script: scripts/write_live_config.
819 [live_config]
820 # permissions! each user should have one of admin, sponsor, or employee as their permission level
821 employees = reddit:admin
822 # links that get their own infrastructure (comma-delimited list of id36s)
823 fastlane_links =
824 # a message placed in the infobar
825 announcement_message =
826 # an info message placed in the sidebar
827 sidebar_message =
828 # an info message placed in the sidebar for gold users
829 gold_sidebar_message =
830 # probability of the subreddit suggester showing up in the spotlight box
831 # for users that have at some point edited their subscriptions:
832 spotlight_interest_sub_p = .05
833 # and for users that have not ever subscribed:
834 spotlight_interest_nosub_p = .1
835 # map of comment tree version to how frequently it should be chosen relative to
836 # the others
837 comment_tree_version_weights = 1:1, 2:0, 3:0
838 # enables/disables client side logging POSTs to /web/log/...
839 frontend_logging = true
840 # daily gold revenue goal (in pennies) for progress bar thing
841 gold_revenue_goal = 0
842 # messages to display in the "you're new here" welcome bar
843 # space-delimited list of strings with / to indicate newlines
844 welcomebar_messages =
845 # sample multireddits (displayed when a user has no multis)
846 listing_chooser_sample_multis = /user/reddit/m/hello, /user/reddit/m/world
847 # multi of subreddits to share with gold users
848 listing_chooser_gold_multi = /user/reddit/m/gold
849 # subreddit showcasing new multireddits
850 listing_chooser_explore_sr =
851 # subreddits that help people discover more subreddits (used in explore tab)
852 discovery_srs =
853 # historical cost to run a reddit server
854 pennies_per_server_second = 1970/1/1:1
855 # lowercased names of accounts that API clients use as "proxies" for gilding
856 proxy_gilding_accounts =
857 # Controversial item determination
858 # Criteria for an item to meet to be determined as controversial
859 cflag_min_votes = 7
860 cflag_lower_bound = 0.4
861 cflag_upper_bound = 0.6
862 # Karma requirements to disable captchas - must meet at least one
863 captcha_exempt_link_karma = 1
864 captcha_exempt_comment_karma = 1
865 # Requirements to allow creating a subreddit - must meet age req + at least one karma req
866 create_sr_account_age_days = 0
867 create_sr_link_karma = 0
868 create_sr_comment_karma = 0
869 # class name to style goldvertisement for special events
870 goldvertisement_class =
871 # Event-collector sample rate for vote events
872 events_collector_vote_sample_rate = 0.0
873 # Event-collector sample rate for submit (new link) events
874 events_collector_submit_sample_rate = 0.0
875 # Event-collector sample rate for new comment events
876 events_collector_comment_sample_rate = 0.0
877 # Event-collector sample rate for cache poisoning events
878 events_collector_poison_sample_rate = 0.0
879 # Event-collector sample rate for moderator events
880 events_collector_mod_sample_rate = 0.0
881 # Event-collector sample rate for quarantine events
882 events_collector_quarantine_sample_rate = 0.0
883 # Event-collector sample rate for modmail events
884 events_collector_modmail_sample_rate = 0.0
885 # Event-collector sample rate for message events
886 events_collector_message_sample_rate = 0.0
887 # Event-collector sample rate for report events
888 events_collector_report_sample_rate = 0.0
889 # Event-collector gzip chance
890 events_collector_use_gzip_chance = 0.5
891 # Pages that are not yet supported by mobile web, and therefore should not
892 # receive the switch-to-mobile banner
893 mweb_blacklist_expressions = ^/prefs/?, ^/live/?, /message/, /wiki/?, /m/, ^/subreddits/create, /submit, ^/r/[^/]+/about/, ^/gold, ^/advertising, ^/promoted, ^/rules, ^/buttons
895 ads_popularity_threshold = 0
896 # Ads: determines probability to try to show ad for logged in user
897 ad_probability = .75
899 # How often (0.0 being never, 1.0 being always) to run the HTTPS cert test
900 https_cert_testing_probability = 0.01
901 # A descriptive name for this test run (change whenever one of the URLs or certs changes)
902 https_cert_testing_run_name = default
903 # A URL to a known-good image resource to compare against `https_testing_img_test`
904 # needs to be protocol-relative so we can tell how many HTTP clients don't support HTTPS at all
905 # It should be served with an HTTPS cert that you know works everywhere.
906 https_cert_testing_img_control =
907 # A URL to an image served with an HTTPS cert of unknown client support. This should
908 # have the same path and base domain (taking into account effective TLDs https://publicsuffix.org/list/effective_tld_names.dat)
909 # as `https_cert_testing_img_control` to rule out load failures due to ad blockers
910 # and things like RequestPolicy. A different subdomain is required, though, and you
911 # should use a different subdomain for every cert.
912 https_cert_testing_img_test =
915 # Manage ZenDesk content from reddit
916 ticket_provider =
917 # the domain of your support ticket provider
918 ticket_base_url =
919 # the user ID to create the contact tickets under
920 ticket_contact_user_id = 0
921 # the group name to ID for the groups defined in zendesk (comma separated list of label:numeric_ID)
922 ticket_groups =
923 # the custom fields to ID for fields created in zendesk (comma separated list of label:numeric_ID)
924 ticket_user_fields =
926 # Posting to lumendatabase.org
927 lumendatabase_org_api_base_url = https://lumendatabase.org/
928 # Facebook sharing app id
929 facebook_app_id =
931 # Client IDs of OAuth2 apps that employees may link their accounts to
932 # `client_name:client_id` pairs are used for readability.
933 employee_approved_clients =
935 # modmail email mapping from subreddit name to forwarding email address
936 modmail_forwarding_email =
938 # modmail email mapping from sender name to reddit account name
939 modmail_account_map =
941 # experiments that require the page cache to always be varied
942 global_loid_experiments =
944 # precomputed comment orders
945 precomputed_comment_sort_read_chance = 0
946 precomputed_comment_sorts =
947 precomputed_comment_sort_min_comments = 0
948 precomputed_comment_suggested_sort = false
950 # once a comment has more than `comment_vote_update_threshold` votes only update
951 # scores every `comment_vote_update_period` votes.
952 # e.g. if comment_vote_update_threshold = 100 and comment_vote_update_period = 5
953 # when a comment has over 100 votes its score will be updated every 5th vote
954 comment_vote_update_threshold = 100
955 comment_vote_update_period = 1
957 #### Features
959 ## HTTPS
960 # Used to gradually redirect users to HTTPS (without HSTS or secure cookies)
961 feature_https_redirect = off
962 # Force the use of HTTPS (tell apps we want HTTPS connections only, use `Secure` cookies)
963 # effectively means `https_redirect = on` as well.
964 feature_force_https = off
965 # Take existing cookies and make them HTTPS-only (requires `force_https`)
966 feature_upgrade_cookies = off
969 feature_multireddit_customizations = off
970 # Test if `https_testing_img_test` is loaded with an acceptable HTTPS cert according to users' browsers
971 feature_test_https_certs = off
972 feature_mobile_web_targeting = {"employee": true}
973 feature_mobile_native_targeting = {"employee": true}
974 feature_pause_ads = on
975 feature_ads_auction = {"employee": true}
976 feature_cpc_pricing = off