tracing: Add traces for Cassandra
[reddit.git] / r2 / example.ini
blobfe431770a6f4dfa706bd48cac5534b80ae25ef35
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 = 0
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 =
235 ############################################ PLUGINS
236 # which plugins are enabled (they must be installed via setup.py first)
237 plugins =
239 ###### about
240 # set which subreddits the about page pulls its source data from
241 # make sure you create the subreddits as well, otherwise you'll get an error
242 about_sr_quotes = about_quotes
243 about_sr_images = about_images
244 # size limit on the about page slideshow
245 about_images_count = 50
246 about_images_min_score = 1
248 advertising_links_sr = advertising_links
249 wiki_page_selfserve_advertisers = advertising/advertisers
250 wiki_page_selfserve_content = advertising/content
251 wiki_page_selfserve_blurbs = advertising/blurbs
252 wiki_page_selfserve_quotes = advertising/quotes
253 wiki_page_selfserve_help = advertising/help
255 ###### liveupdate
256 # the domain the activity pixel is hosted on
257 liveupdate_pixel_domain = %(domain)s
258 # maximum number of outstanding invites an event can have
259 liveupdate_invite_quota = 5
261 mobile_auth_gild_clients = android123, ios123
262 # days
263 mobile_auth_gild_time = 90
264 mobile_auth_gild_message = 3 months
266 ############################################ LOGGING
267 # whether to print a "reddit app started" message at start
268 log_start = true
269 # enable/disable logging of exceptions and events via amqp/rabbitmq
270 amqp_logging = false
271 # exception reporter objects to give to ErrorMiddleware (see log.py)
272 error_reporters =
275 ############################################ METRICS
276 # where to send metrics
277 statsd_addr =
278 # how often to send them [0.0 - 1.0]
279 statsd_sample_rate = 1.0
280 # percentage of stats for sampling (0-100)
281 stats_sample_rate = 1
283 ############################################ TRACING
284 # where to send traces (leave blank for debug mode, traces will be logged)
285 tracing_endpoint =
286 tracing_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 ############################################ SITEMAPS
304 # path of the subreddit sitemap index
305 sitemap_subreddit_keyname =
306 # s3 information related to where the sitemaps are statically stored
307 sitemap_upload_s3_bucket =
308 sitemap_s3_static_host =
309 sitemap_subreddit_static_url =
310 # the SQS queue that we use to receive messages to modify our sitemaps
311 sitemap_sqs_queue =
314 ############################################ MEDIA STORAGE
315 # which backend provider to use for media (thumbnails, subreddit stylesheets,
316 # subreddit images, app icons). options are:
317 # s3 - use amazon s3
318 # filesystem - write to local filesystem
319 # or write your own!
320 media_provider = s3
322 # s3 provider
323 # your s3 credentials -- if these are left blank, we'll pass None to
324 # boto which will trigger it to look in various places, including instance
325 # metadata if on ec2, for credentials.
326 S3KEY_ID =
327 S3SECRET_KEY =
328 # May be one bucket, or many buckets seperated by commas
329 s3_media_buckets =
330 s3_image_buckets =
331 # Store direct urls for images, rather than buckets
332 # For the bucket mybucket with the image helloworld.jpg the stored url would be:
333 # true: http://{s3_media_domain}/mybucket/helloworld.jpg
334 # false: http://mybucket/helloworld.jpg
335 s3_media_direct = true
336 # Which S3 region to use
337 # If using the US region, the default is correct. Otherwise, use a region-specific
338 # endpoint as in http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
339 s3_media_domain = s3.amazonaws.com
341 # filesystem provider configuration
342 media_fs_root =
343 media_fs_base_url_http =
345 thumbnail_size = 70, 70
346 thumbnail_hidpi_scaling = 2
348 preview_image_max_size = 1024, 768
349 preview_image_min_size = 100, 100
350 media_preview_domain_whitelist =
352 # The provider that handles on-the-fly resizing of images. Options:
353 # imgix
354 # no_op
355 image_resizing_provider = no_op
357 # Which domain to use to request imgix-processed files.
358 imgix_domain = imgix.example.com
359 # Whether to sign imgix urls.
360 imgix_signing = false
361 # registration captcha
362 captcha_provider = no_op
365 ############################################ EMERGENCY MODES
366 # emergency measures: makes the site read only
367 read_only_mode = false
368 # a modified read only mode used for cache shown during heavy load 503s
369 heavy_load_mode = false
370 # override default site language for things like pirate day
371 lang_override =
372 # enable/disable automatic creation of database tables/column families
373 db_create_tables = True
374 # are we allowed to write to databases at all?
375 disallow_db_writes = False
376 # disable custom subreddit stylesheets
377 css_killswitch = False
380 ############################################ SCRAPER
381 # user agent for the scraper
382 useragent = Mozilla/5.0 (compatible; redditbot/1.0; +http://www.reddit.com/feedback)
383 # Embedly API Key. if no key is provided, the scraper will only fetch thumbnails.
384 embedly_api_key =
385 # A tuple of what media_object types will automatically be displayed on comments view.
386 # Ex: liveupdate, custom
387 autoexpand_media_types = liveupdate
390 ############################################ NEWSLETTER
391 # The list ID within campaign monitor to be altering
392 newsletter_list_id =
394 ############################################ QUOTAS
395 # quota for various types of relations creatable in subreddits
396 sr_banned_quota = 10000
397 sr_muted_quota = 10000
398 sr_moderator_invite_quota = 10000
399 sr_contributor_quota = 10000
400 sr_wikibanned_quota = 10000
401 sr_wikicontributor_quota = 10000
402 sr_quota_time = 7200
403 sr_invite_limit = 25
404 # delay before allowing a link to be shared
405 new_link_share_delay = 30 seconds
406 # max number of uploaded images per subreddit
407 max_sr_images = 50
410 ############################################ RATELIMITS
411 # If true, send 429 responses on exceeded ratelimits
412 # If false, send headers only, but don't abort
413 # Only applies if tracking is enabled below
414 ENFORCE_RATELIMIT = false
416 # If true, store per-user request counts in ratelimits cache
417 RL_SITEWIDE_ENABLED = true
418 # How large of a burst window will users be allowed?
419 RL_RESET_MINUTES = 10
420 # What is the average request rate over the above time period?
421 RL_AVG_REQ_PER_SEC = 0.5
423 # Same as above, but configured separately for connections via OAuth
424 RL_OAUTH_SITEWIDE_ENABLED = true
425 RL_OAUTH_RESET_MINUTES = 10
426 RL_OAUTH_AVG_REQ_PER_SEC = 0.5
428 # same as above, but for failed login attempts per account
429 RL_LOGIN_AVG_PER_SEC = .1
430 # same as above, but for failed login attempts per unfamiliar ip address
431 RL_LOGIN_IP_AVG_PER_SEC = .1
432 # and email/PM shares
433 RL_SHARE_AVG_PER_SEC = .1
435 # user agent regexps to hard-ratelimit to a number of requests per ten second period
436 # example: user_agent_ratelimit_regexes = (?i)googlebot:10, (?i)appengine:2
437 user_agent_ratelimit_regexes =
439 # karma needed to avoid per-subreddit submission ratelimits
440 MIN_RATE_LIMIT_KARMA = 10
441 MIN_RATE_LIMIT_COMMENT_KARMA = 1
444 ############################################ THRESHOLDS
445 # if the user has positive total karma, their per-subreddit karma will default to this, else 0
446 MIN_UP_KARMA = 1
448 # minimum user karma total values to show to non-admins
449 link_karma_display_floor = 1
450 comment_karma_display_floor = -100
452 # age at which links/comments become "archived" and can no longer be voted on, replied to, or reported
453 ARCHIVE_AGE = 180 days
455 # the maximum amount of time we use memcache to hide that a vote hasn't been
456 # asynchronously processed yet.
457 vote_queue_grace_period = 1 hour
459 # minimum age of an account (in days) for the "create a subreddit" button to show
460 min_membership_create_community = 30
461 # maximum age (in days) of items eligible for display on normalized hot pages (frontpage, multis, etc.)
462 HOT_PAGE_AGE = 1000
463 # how long to consider links eligible for the rising page
464 rising_period = 12 hours
465 # default number of comments shown
466 num_comments = 100
467 # max number of comments to show at once
468 max_comments = 500
469 max_comments_gold = 2500
470 # max number of parents to walk up the tree while uncollapsing replies in Q&A
471 # sort mode
472 max_comment_parent_walk = 20
473 # how deep do we go into the top listing when fetching /random
474 num_serendipity = 250
475 # Conflate visits to a comment page that happen within this many
476 # seconds of each other (gold "new comments" feature)
477 comment_visits_period = 600
478 # Max number of mentions to extract per comment
479 butler_max_mentions = 3
480 # Number of days to keep recent wiki revisions for
481 wiki_keep_recent_days = 7
482 # Max number of bytes for wiki pages
483 wiki_max_page_length_bytes = 262144
484 # Max wiki page name length
485 wiki_max_page_name_length = 128
486 # Max number of separators in a wiki page name
487 wiki_max_page_separators = 3
490 ############################################ SEARCH
491 # search provider name
492 search_provider = cloudsearch
494 # endpoint for link search
495 CLOUDSEARCH_SEARCH_API =
496 # endpoint for link upload
497 CLOUDSEARCH_DOC_API =
498 # endpoint for subreddit search
499 CLOUDSEARCH_SUBREDDIT_SEARCH_API =
500 # endpoint for subreddit upload
501 CLOUDSEARCH_SUBREDDIT_DOC_API =
503 ############################################ MEMCACHE
504 num_mc_clients = 5
505 # hosts to store memcache-based locks on
506 lockcaches = 127.0.0.1:11211
507 # hosts that cache permacache cassandra data
508 permacache_memcaches = 127.0.0.1:11211
509 # a local cache that's not globally consistent and can have stale data (optional)
510 stalecaches =
511 # hosts to store hardcache data
512 hardcache_memcaches = 127.0.0.1:11211
515 ############################################ MCROUTER
516 mcrouter_addr = 127.0.0.1:5050
519 ############################################ MISCELLANEOUS
520 # default localization for strings (when using python's locale.format)
521 # (mostly replaced by babel, this shouldn't be necessary to change)
522 locale = C
523 # storage timezone, should probably not be changed from UTC
524 timezone = UTC
525 # timezone for display of some data, deprecated
526 display_timezone = MST
527 # location of the static directory
528 static_path = /static/
529 # domains that we consider URLs case sensitive for repost detection purposes
530 case_sensitive_domains = i.imgur.com, youtube.com
531 # Domains that we know are friendly and host raw image files
532 known_image_domains = i.imgur.com, giant.gfycat.com, pbs.twimg.com, upload.wikimedia.org
533 # whether to load reddit private code (a hack until we structure it better)
534 import_private = false
535 # location of geoip service
536 geoip_location = http://127.0.0.1:5000
537 # account name that AutoModerator actions will be done by
538 automoderator_account =
539 # Which scheme to use for URLs when the current protocol isn't known
540 default_scheme = http
543 ############################################ AUTHENTICATION
544 # how to authenticate users. options are:
545 # cookie: standard cookie-based auth
546 # http: http basic authentication
547 # or write your own!
548 authentication_provider = cookie
549 # the work factor for bcrypt, increment this every time computers double in
550 # speed. don't worry, changing this won't break old passwords
551 bcrypt_work_factor = 12
552 # name of the cookie to drop with login information
553 login_cookie = reddit_session
554 # name of the admin cookie
555 admin_cookie = reddit_admin
556 # name of the otp cookie
557 otp_cookie = reddit_otp
558 # the maximum life of an admin cookie (seconds)
559 ADMIN_COOKIE_TTL = 32400
560 # the maximum amount of idle time for an admin cookie (seconds)
561 ADMIN_COOKIE_MAX_IDLE = 900
562 # the maximum life of an otp cookie
563 OTP_COOKIE_TTL = 604800
564 # funky app user agents exempt from the login CSRF prevention
565 exempt_login_user_agents =
566 # for the http provider:
567 # should we trust the authorization header and auto-register accounts?
568 auth_trust_http_authorization = false
571 ############################################ CASSANDRA
572 # cassandra hosts
573 cassandra_seeds = 127.0.0.1:9160
574 # number of connections to keep open to the cassandra ring
575 cassandra_pool_size = 5
576 # default read/write consistency levels for Cassandra
577 cassandra_rcl = ONE
578 cassandra_wcl = ONE
579 # name of default connection pool to use when _connection_pool not specified
580 cassandra_default_pool = main
583 ############################################ AMQP
584 amqp_host = localhost:5672
585 amqp_user = reddit
586 amqp_pass = reddit
587 amqp_virtual_host = /
590 ############################################ ZOOKEEPER
591 # zookeeper is optional at the moment
592 zookeeper_connection_string = localhost:2181
593 zookeeper_username = reddit
594 zookeeper_password = reddit
596 # these should be one of "config" or "zookeeper"
597 # - config: read from the local ini file
598 # - zookeeper: read from the zookeeper cluster
599 liveconfig_source = config
600 secrets_source = config
603 ############################################ EMAIL
604 smtp_server = localhost
605 # the "from" address for link share emails
606 share_reply = noreply@reddit.com
607 # where to send feedback comments
608 feedback_email = reddit@gmail.com
609 # the "from" address for orangered notifications
610 notification_email = notifications@example.com
611 # email to ads team
612 ads_email = ad-ops@reddit.com
614 ############################################ POSTGRES
615 db_user = reddit
616 db_pass = password
617 db_port = 5432
618 db_pool_size = 3
619 db_pool_overflow_size = 3
621 # list of all databases named in the subsequent table
622 databases = main, comment, email, authorize, award, hc, traffic
624 #db name db host user, pass, port, conn, overflow_conn
625 main_db = reddit, 127.0.0.1, *, *, *, *, *
626 comment_db = reddit, 127.0.0.1, *, *, *, *, *
627 comment2_db = reddit, 127.0.0.1, *, *, *, *, *
628 email_db = reddit, 127.0.0.1, *, *, *, *, *
629 authorize_db = reddit, 127.0.0.1, *, *, *, *, *
630 award_db = reddit, 127.0.0.1, *, *, *, *, *
631 hc_db = reddit, 127.0.0.1, *, *, *, *, *
632 traffic_db = reddit, 127.0.0.1, *, *, *, *, *
634 hardcache_categories = *:hc:hc
636 # this setting will prefix all of the table names
637 db_app_name = reddit
639 type_db = main
640 rel_type_db = main
641 hardcache_db = main
643 # definitions of what each table is (probably shouldn't change in .update files)
644 # things require no extra info. relation is followed by the names of the related tables
645 # a !typeid=# flag allows overriding of the type id for a thing/rel to avoid the db
646 # hit on app startup.
647 db_table_link = thing
648 db_table_account = thing
649 db_table_message = thing
650 db_table_comment = thing
651 db_table_subreddit = thing
652 db_table_srmember = relation, subreddit, account
653 db_table_friend = relation, account, account
654 db_table_inbox_account_comment = relation, account, comment
655 db_table_inbox_account_message = relation, account, message
656 db_table_moderatorinbox = relation, subreddit, message
657 db_table_report_account_link = relation, account, link
658 db_table_report_account_comment = relation, account, comment
659 db_table_report_account_message = relation, account, message
660 db_table_report_account_subreddit = relation, account, subreddit
661 db_table_award = thing
662 db_table_trophy = relation, account, award
663 db_table_jury_account_link = relation, account, link
664 db_table_flair = relation, subreddit, account
665 db_table_promocampaign = thing
667 # which servers to find each table on (likely to change in .update files)
668 # first server listed is assumed to be the master, all others are read-only slaves
669 # additionally, a "!avoid_master" flag may be added to specify that reads should use the slaves
670 db_servers_link = main, main
671 db_servers_account = main
672 db_servers_message = main
673 db_servers_comment = comment
674 db_servers_subreddit = comment
675 db_servers_srmember = comment
676 db_servers_friend = comment
677 db_servers_inbox_account_comment = main
678 db_servers_inbox_account_message = main
679 db_servers_moderatorinbox = main
680 db_servers_report_account_link = main
681 db_servers_report_account_comment = comment
682 db_servers_report_account_message = main
683 db_servers_report_account_subreddit = main
684 db_servers_award = award
685 db_servers_trophy = award
686 db_servers_jury_account_link = main
687 db_servers_ad = main
688 db_servers_adsr = main
689 db_servers_flair = main
690 db_servers_promocampaign = main
693 ############################################ GOLD
694 goldpayment_email =
695 # "thanks for subscribing to reddit gold" return address
696 goldsupport_email =
698 gold_month_price = 3.99
699 gold_year_price = 29.99
701 PAYPAL_BUTTONID_ONETIME_BYMONTH =
702 PAYPAL_BUTTONID_ONETIME_BYYEAR =
703 PAYPAL_BUTTONID_AUTORENEW_BYMONTH =
704 PAYPAL_BUTTONID_AUTORENEW_BYYEAR =
705 PAYPAL_BUTTONID_CREDDITS_BYMONTH =
706 PAYPAL_BUTTONID_CREDDITS_BYYEAR =
707 PAYPAL_BUTTONID_GIFTCODE_BYMONTH =
708 PAYPAL_BUTTONID_GIFTCODE_BYYEAR =
709 STRIPE_MONTHLY_GOLD_PLAN =
710 STRIPE_YEARLY_GOLD_PLAN =
711 COINBASE_BUTTONID_ONETIME_1MO =
712 COINBASE_BUTTONID_ONETIME_3MO =
713 COINBASE_BUTTONID_ONETIME_1YR =
714 COINBASE_BUTTONID_ONETIME_2YR =
715 COINBASE_BUTTONID_ONETIME_3YR =
717 adzerk_url =
718 gold_hostname_file =
720 ############################################ SELF-SERVE ADS
721 selfserve_support_email = selfservesupport@mydomain.com
722 MAX_CAMPAIGNS_PER_LINK = 100
723 cpm_selfserve = 1.50
724 cpm_selfserve_geotarget_metro = 5.00
725 cpm_selfserve_geotarget_country = 2.00
726 cpm_selfserve_collection = 1.50
727 authorizenetapi =
728 default_total_budget_pennies = 10000
729 min_total_budget_pennies = 500
730 max_total_budget_pennies = 999900
731 default_bid_pennies = 150
732 min_bid_pennies = 75
733 max_bid_pennies = 1000
734 adserver_click_domain =
735 authnet_validate = true
736 # Define versions for mobile OS platform
737 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
738 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
739 frequency_cap_min = 3
740 frequency_cap_default = 3
743 ############################################ TRAFFIC
744 TRAFFIC_ACCESS_KEY =
745 TRAFFIC_SECRET_KEY =
746 RAW_LOG_DIR =
747 PROCESSED_DIR =
748 AGGREGATE_DIR =
749 AWS_LOG_DIR =
750 TRAFFIC_SRC_DIR =
751 TRAFFIC_LOG_HOSTS =
753 ############################################ TRAFFIC EMR ROLE
754 emr_trafic_job_flow_role = EMR_EC2_DefaultRole
755 emr_traffic_service_role = EMR_DefaultRole
756 emr_traffic_tags =
758 ############################################ PERFORMANCE / SCALING
759 # should we split comment tree processing into shards based on the link id?
760 # this helps with lock contention but isn't necessary on smaller sites
761 shard_commentstree_queues = false
762 # should we split links by author query processing into shards by author id?
763 shard_author_query_queues = false
764 # should we split links by subreddit query processing into shards by sr id?
765 shard_subreddit_query_queues = false
766 # should we split links by domain query processing into shards by domain?
767 shard_domain_query_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 comment pane cache (for a subset of logged in users, see pages.py:CommentPane)
772 commentpane_cache_time = 120
775 ############################################ SERVICES
776 ###### activity
777 activity_endpoint = localhost:9002
780 [server:main]
781 use = egg:Paste#http
782 host = 0.0.0.0
783 port = %(http_port)s
785 [filter:gzip]
786 use = egg:r2#gzip
787 compress_level = 6
788 min_size = 800
790 [app:main]
791 use = egg:r2
792 cache_dir = %(here)s/data
794 [loggers]
795 keys = root, tracing
797 [logger_root]
798 level = WARNING
799 handlers = console
801 [logger_tracing]
802 level = DEBUG
803 qualname = NullRecorder
804 # propagate up to root
805 handlers =
807 [handlers]
808 keys = console
810 [handler_console]
811 class = StreamHandler
812 args = (sys.stdout,)
814 [formatters]
815 keys = reddit
817 [formatter_reddit]
818 format = %(message)s
820 # the following configuration section makes up the "live" config. if zookeeper
821 # is enabled, then this configuration will be found by the app in zookeeper. to
822 # write it to zookeeper, use the writer script: scripts/write_live_config.
823 [live_config]
824 # permissions! each user should have one of admin, sponsor, or employee as their permission level
825 employees = reddit:admin
826 # links that get their own infrastructure (comma-delimited list of id36s)
827 fastlane_links =
828 # a message placed in the infobar
829 announcement_message =
830 # an info message placed in the sidebar
831 sidebar_message =
832 # an info message placed in the sidebar for gold users
833 gold_sidebar_message =
834 # probability of the subreddit suggester showing up in the spotlight box
835 # for users that have at some point edited their subscriptions:
836 spotlight_interest_sub_p = .05
837 # and for users that have not ever subscribed:
838 spotlight_interest_nosub_p = .1
839 # enables/disables client side logging POSTs to /web/log/...
840 frontend_logging = true
841 # daily gold revenue goal (in pennies) for progress bar thing
842 gold_revenue_goal = 0
843 # messages to display in the "you're new here" welcome bar
844 # space-delimited list of strings with / to indicate newlines
845 welcomebar_messages =
846 # sample multireddits (displayed when a user has no multis)
847 listing_chooser_sample_multis = /user/reddit/m/hello, /user/reddit/m/world
848 # multi of subreddits to share with gold users
849 listing_chooser_gold_multi = /user/reddit/m/gold
850 # subreddit showcasing new multireddits
851 listing_chooser_explore_sr =
852 # subreddits that help people discover more subreddits (used in explore tab)
853 discovery_srs =
854 # historical cost to run a reddit server
855 pennies_per_server_second = 1970/1/1:1
856 # lowercased names of accounts that API clients use as "proxies" for gilding
857 proxy_gilding_accounts =
858 # Controversial item determination
859 # Criteria for an item to meet to be determined as controversial
860 cflag_min_votes = 7
861 cflag_lower_bound = 0.4
862 cflag_upper_bound = 0.6
863 # Karma requirements to disable captchas - must meet at least one
864 captcha_exempt_link_karma = 1
865 captcha_exempt_comment_karma = 1
866 # Requirements to allow creating a subreddit - must meet age req + at least one karma req
867 create_sr_account_age_days = 0
868 create_sr_link_karma = 0
869 create_sr_comment_karma = 0
870 # class name to style goldvertisement for special events
871 goldvertisement_class =
872 # Event-collector sample rate for vote events
873 events_collector_vote_sample_rate = 0.0
874 # Event-collector sample rate for submit (new link) events
875 events_collector_submit_sample_rate = 0.0
876 # Event-collector sample rate for new comment events
877 events_collector_comment_sample_rate = 0.0
878 # Event-collector sample rate for cache poisoning events
879 events_collector_poison_sample_rate = 0.0
880 # Event-collector sample rate for moderator events
881 events_collector_mod_sample_rate = 0.0
882 # Event-collector sample rate for quarantine events
883 events_collector_quarantine_sample_rate = 0.0
884 # Event-collector sample rate for modmail events
885 events_collector_modmail_sample_rate = 0.0
886 # Event-collector sample rate for message events
887 events_collector_message_sample_rate = 0.0
888 # Event-collector sample rate for report events
889 events_collector_report_sample_rate = 0.0
890 # Event-collector gzip chance
891 events_collector_use_gzip_chance = 0.5
892 # Pages that are not yet supported by mobile web, and therefore should not
893 # receive the switch-to-mobile banner
894 mweb_blacklist_expressions = ^/prefs/?, ^/live/?, /message/, /wiki/?, /m/, ^/subreddits/create, /submit, ^/r/[^/]+/about/, ^/gold, ^/advertising, ^/promoted, ^/rules, ^/buttons
896 ads_popularity_threshold = 0
897 # Ads: determines probability to try to show ad for logged in user
898 ad_probability = .75
900 # How often (0.0 being never, 1.0 being always) to run the HTTPS cert test
901 https_cert_testing_probability = 0.01
902 # A descriptive name for this test run (change whenever one of the URLs or certs changes)
903 https_cert_testing_run_name = default
904 # A URL to a known-good image resource to compare against `https_testing_img_test`
905 # needs to be protocol-relative so we can tell how many HTTP clients don't support HTTPS at all
906 # It should be served with an HTTPS cert that you know works everywhere.
907 https_cert_testing_img_control =
908 # A URL to an image served with an HTTPS cert of unknown client support. This should
909 # have the same path and base domain (taking into account effective TLDs https://publicsuffix.org/list/effective_tld_names.dat)
910 # as `https_cert_testing_img_control` to rule out load failures due to ad blockers
911 # and things like RequestPolicy. A different subdomain is required, though, and you
912 # should use a different subdomain for every cert.
913 https_cert_testing_img_test =
916 # Manage ZenDesk content from reddit
917 ticket_provider =
918 # the domain of your support ticket provider
919 ticket_base_url =
920 # the user ID to create the contact tickets under
921 ticket_contact_user_id = 0
922 # the group name to ID for the groups defined in zendesk (comma separated list of label:numeric_ID)
923 ticket_groups =
924 # the custom fields to ID for fields created in zendesk (comma separated list of label:numeric_ID)
925 ticket_user_fields =
927 # Posting to lumendatabase.org
928 lumendatabase_org_api_base_url = https://lumendatabase.org/
929 # Facebook sharing app id
930 facebook_app_id =
932 # Client IDs of OAuth2 apps that employees may link their accounts to
933 # `client_name:client_id` pairs are used for readability.
934 employee_approved_clients =
936 # modmail email mapping from subreddit name to forwarding email address
937 modmail_forwarding_email =
939 # modmail email mapping from sender name to reddit account name
940 modmail_account_map =
942 # experiments that require the page cache to always be varied
943 global_loid_experiments =
945 # precomputed comment orders
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
977 feature_utm_comment_links = off