total rebase
[anni] / config / config.exs
1 #                                 .i;;;;i.
2 #                               iYcviii;vXY:
3 #                             .YXi       .i1c.
4 #                            .YC.     .    in7.
5 #                           .vc.   ......   ;1c.
6 #                           i7,   ..        .;1;
7 #                          i7,   .. ...      .Y1i
8 #                         ,7v     .6MMM@;     .YX,
9 #                        .7;.   ..IMMMMMM1     :t7.
10 #                       .;Y.     ;$MMMMMM9.     :tc.
11 #                       vY.   .. .nMMM@MMU.      ;1v.
12 #                      i7i   ...  .#MM@M@C. .....:71i
13 #                     it:   ....   $MMM@9;.,i;;;i,;tti
14 #                    :t7.  .....   0MMMWv.,iii:::,,;St.
15 #                   .nC.   .....   IMMMQ..,::::::,.,czX.
16 #                  .ct:   ....... .ZMMMI..,:::::::,,:76Y.
17 #                  c2:   ......,i..Y$M@t..:::::::,,..inZY
18 #                 vov   ......:ii..c$MBc..,,,,,,,,,,..iI9i
19 #                i9Y   ......iii:..7@MA,..,,,,,,,,,....;AA:
20 #               iIS.  ......:ii::..;@MI....,............;Ez.
21 #              .I9.  ......:i::::...8M1..................C0z.
22 #             .z9;  ......:i::::,.. .i:...................zWX.
23 #             vbv  ......,i::::,,.      ................. :AQY
24 #            c6Y.  .,...,::::,,..:t0@@QY. ................ :8bi
25 #           :6S. ..,,...,:::,,,..EMMMMMMI. ............... .;bZ,
26 #          :6o,  .,,,,..:::,,,..i#MMMMMM#v.................  YW2.
27 #         .n8i ..,,,,,,,::,,,,.. tMMMMM@C:.................. .1Wn
28 #         7Uc. .:::,,,,,::,,,,..   i1t;,..................... .UEi
29 #         7C...::::::::::::,,,,..        ....................  vSi.
30 #         ;1;...,,::::::,.........       ..................    Yz:
31 #          v97,.........                                     .voC.
32 #           izAotX7777777777777777777777777777777777777777Y7n92:
33 #             .;CoIIIIIUAA666666699999ZZZZZZZZZZZZZZZZZZZZ6ov.
34 #
35 #                          !!! ATTENTION !!!
36 # DO NOT EDIT THIS FILE! THIS FILE CONTAINS THE DEFAULT VALUES FOR THE CON-
37 # FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
38 #
39 # This file is responsible for configuring your application
40 # and its dependencies with the aid of the Config module.
41 #
42 # This configuration file is loaded before any dependency and
43 # is restricted to this project.
44 import Config
45
46 # General application configuration
47 config :pleroma, ecto_repos: [Pleroma.Repo]
48
49 config :pleroma, Pleroma.Repo,
50   telemetry_event: [Pleroma.Repo.Instrumenter],
51   migration_lock: nil
52
53 config :pleroma, Pleroma.Captcha,
54   enabled: true,
55   seconds_valid: 300,
56   method: Pleroma.Captcha.Native
57
58 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
59
60 # Upload configuration
61 config :pleroma, Pleroma.Upload,
62   uploader: Pleroma.Uploaders.Local,
63   filters: [Pleroma.Upload.Filter.Dedupe],
64   link_name: false,
65   proxy_remote: false,
66   filename_display_max_length: 30,
67   default_description: nil,
68   base_url: nil
69
70 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
71
72 config :pleroma, Pleroma.Uploaders.S3,
73   bucket: nil,
74   bucket_namespace: nil,
75   truncated_namespace: nil,
76   streaming_enabled: true
77
78 config :ex_aws, :s3,
79   # host: "s3.wasabisys.com", # required if not Amazon AWS
80   access_key_id: nil,
81   secret_access_key: nil,
82   # region: "us-east-1", # may be required for Amazon AWS
83   scheme: "https://"
84
85 config :pleroma, :emoji,
86   shortcode_globs: ["/emoji/custom/**/*.png"],
87   pack_extensions: [".png", ".gif"],
88   groups: [
89     Custom: ["/emoji/*.png", "/emoji/**/*.png"]
90   ],
91   default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json",
92   shared_pack_cache_seconds_per_file: 60
93
94 config :pleroma, :uri_schemes,
95   valid_schemes: [
96     "https",
97     "http",
98     "dat",
99     "dweb",
100     "gopher",
101     "hyper",
102     "ipfs",
103     "ipns",
104     "irc",
105     "ircs",
106     "magnet",
107     "mailto",
108     "mumble",
109     "ssb",
110     "xmpp"
111   ]
112
113 # Configures the endpoint
114 config :pleroma, Pleroma.Web.Endpoint,
115   url: [host: "localhost"],
116   http: [
117     ip: {127, 0, 0, 1}
118   ],
119   protocol: "https",
120   secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
121   live_view: [signing_salt: "U5ELgdEwTD3n1+D5s0rY0AMg8/y1STxZ3Zvsl3bWh+oBcGrYdil0rXqPMRd3Glcq"],
122   signing_salt: "CqaoopA2",
123   render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
124   pubsub_server: Pleroma.PubSub,
125   secure_cookie_flag: true,
126   extra_cookie_attrs: [
127     "SameSite=Lax"
128   ]
129
130 # Configures Elixir's Logger
131 config :logger, :console,
132   level: :debug,
133   format: "\n$time $metadata[$level] $message\n",
134   metadata: [:request_id]
135
136 config :logger, :ex_syslogger,
137   level: :debug,
138   ident: "pleroma",
139   format: "$metadata[$level] $message",
140   metadata: [:request_id]
141
142 config :mime, :types, %{
143   "application/xml" => ["xml"],
144   "application/xrd+xml" => ["xrd+xml"],
145   "application/jrd+json" => ["jrd+json"],
146   "application/activity+json" => ["activity+json"],
147   "application/ld+json" => ["activity+json"]
148 }
149
150 config :tesla, adapter: Tesla.Adapter.Hackney
151
152 # Configures http settings, upstream proxy etc.
153 config :pleroma, :http,
154   proxy_url: nil,
155   send_user_agent: true,
156   user_agent: :default,
157   adapter: []
158
159 config :pleroma, :instance,
160   name: "Pleroma",
161   email: "example@example.com",
162   notify_email: "noreply@example.com",
163   description: "Pleroma: An efficient and flexible fediverse server",
164   short_description: "",
165   background_image: "/images/city.jpg",
166   instance_thumbnail: "/instance/thumbnail.jpeg",
167   favicon: "/favicon.png",
168   limit: 5_000,
169   description_limit: 5_000,
170   remote_limit: 100_000,
171   upload_limit: 16_000_000,
172   avatar_upload_limit: 2_000_000,
173   background_upload_limit: 4_000_000,
174   banner_upload_limit: 4_000_000,
175   poll_limits: %{
176     max_options: 20,
177     max_option_chars: 200,
178     min_expiration: 0,
179     max_expiration: 365 * 24 * 60 * 60
180   },
181   registrations_open: true,
182   invites_enabled: false,
183   account_activation_required: false,
184   account_approval_required: false,
185   federating: true,
186   federation_incoming_replies_max_depth: 100,
187   federation_reachability_timeout_days: 7,
188   allow_relay: true,
189   public: true,
190   quarantined_instances: [],
191   static_dir: "instance/static/",
192   allowed_post_formats: [
193     "text/plain",
194     "text/html",
195     "text/markdown",
196     "text/bbcode"
197   ],
198   autofollowed_nicknames: [],
199   autofollowing_nicknames: [],
200   max_pinned_statuses: 1,
201   attachment_links: false,
202   max_report_comment_size: 1000,
203   report_strip_status: true,
204   safe_dm_mentions: false,
205   healthcheck: false,
206   remote_post_retention_days: 90,
207   skip_thread_containment: true,
208   limit_to_local_content: :unauthenticated,
209   user_bio_length: 5000,
210   user_name_length: 100,
211   max_account_fields: 10,
212   max_remote_account_fields: 20,
213   account_field_name_length: 512,
214   account_field_value_length: 2048,
215   registration_reason_length: 500,
216   external_user_synchronization: true,
217   extended_nickname_format: true,
218   cleanup_attachments: false,
219   multi_factor_authentication: [
220     totp: [
221       # digits 6 or 8
222       digits: 6,
223       period: 30
224     ],
225     backup_codes: [
226       number: 5,
227       length: 16
228     ]
229   ],
230   show_reactions: true,
231   password_reset_token_validity: 60 * 60 * 24,
232   profile_directory: true,
233   admin_privileges: [
234     :users_read,
235     :users_manage_invites,
236     :users_manage_activation_state,
237     :users_manage_tags,
238     :users_manage_credentials,
239     :users_delete,
240     :messages_read,
241     :messages_delete,
242     :instances_delete,
243     :reports_manage_reports,
244     :moderation_log_read,
245     :announcements_manage_announcements,
246     :emoji_manage_emoji,
247     :statistics_read
248   ],
249   moderator_privileges: [:messages_delete, :reports_manage_reports],
250   max_endorsed_users: 20,
251   birthday_required: false,
252   birthday_min_age: 0,
253   max_media_attachments: 1_000
254
255 config :pleroma, :welcome,
256   direct_message: [
257     enabled: false,
258     sender_nickname: nil,
259     message: nil
260   ],
261   chat_message: [
262     enabled: false,
263     sender_nickname: nil,
264     message: nil
265   ],
266   email: [
267     enabled: false,
268     sender: nil,
269     subject: "Welcome to <%= instance_name %>",
270     html: "Welcome to <%= instance_name %>",
271     text: "Welcome to <%= instance_name %>"
272   ]
273
274 config :pleroma, :feed,
275   post_title: %{
276     max_length: 100,
277     omission: "..."
278   }
279
280 config :pleroma, :markup,
281   # XXX - unfortunately, inline images must be enabled by default right now, because
282   # of custom emoji.  Issue #275 discusses defanging that somehow.
283   allow_inline_images: true,
284   allow_headings: false,
285   allow_tables: false,
286   allow_fonts: false,
287   scrub_policy: [
288     Pleroma.HTML.Scrubber.Default,
289     Pleroma.HTML.Transform.MediaProxy
290   ]
291
292 config :pleroma, :frontend_configurations,
293   pleroma_fe: %{
294     alwaysShowSubjectInput: true,
295     background: "/images/city.jpg",
296     collapseMessageWithSubject: false,
297     disableChat: false,
298     greentext: false,
299     hideFilteredStatuses: false,
300     hideMutedPosts: false,
301     hidePostStats: false,
302     hideSitename: false,
303     hideUserStats: false,
304     loginMethod: "password",
305     logo: "/static/logo.svg",
306     logoMargin: ".1em",
307     logoMask: true,
308     minimalScopesMode: false,
309     noAttachmentLinks: false,
310     nsfwCensorImage: "",
311     postContentType: "text/plain",
312     redirectRootLogin: "/main/friends",
313     redirectRootNoLogin: "/main/all",
314     scopeCopy: true,
315     sidebarRight: false,
316     showFeaturesPanel: true,
317     showInstanceSpecificPanel: false,
318     subjectLineBehavior: "email",
319     theme: "pleroma-dark",
320     webPushNotifications: false
321   }
322
323 config :pleroma, :assets,
324   mascots: [
325     pleroma_fox_tan: %{
326       url: "/images/pleroma-fox-tan-smol.png",
327       mime_type: "image/png"
328     },
329     pleroma_fox_tan_shy: %{
330       url: "/images/pleroma-fox-tan-shy.png",
331       mime_type: "image/png"
332     }
333   ],
334   default_mascot: :pleroma_fox_tan
335
336 config :pleroma, :manifest,
337   icons: [
338     %{
339       src: "/static/logo.svg",
340       sizes: "144x144",
341       purpose: "any",
342       type: "image/svg+xml"
343     }
344   ],
345   theme_color: "#282c37",
346   background_color: "#191b22"
347
348 config :pleroma, :activitypub,
349   unfollow_blocked: true,
350   outgoing_blocks: true,
351   blockers_visible: true,
352   follow_handshake_timeout: 500,
353   note_replies_output_limit: 5,
354   sign_object_fetches: true,
355   authorized_fetch_mode: false,
356   spoof_object_fetch_signatures: false,
357   spoofed_key: "-----BEGIN RSA PRIVATE KEY-----
358 overwrite this with your internal.fetch key rippen from donor instance DB
359 yes, just like that, newlines are important
360 -----END RSA PRIVATE KEY-----",
361   spoofed_instance: "https://funnydomain.example"
362
363 config :pleroma, :streamer,
364   workers: 3,
365   overflow_workers: 2
366
367 config :pleroma, :user, deny_follow_blocked: true
368
369 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
370
371 config :pleroma, :mrf_rejectnonpublic,
372   allow_followersonly: false,
373   allow_direct: false
374
375 config :pleroma, :mrf_hellthread,
376   delist_threshold: 10,
377   reject_threshold: 20
378
379 config :pleroma, :mrf_simple,
380   media_removal: [],
381   media_nsfw: [],
382   federated_timeline_removal: [],
383   report_removal: [],
384   reject: [],
385   followers_only: [],
386   accept: [],
387   avatar_removal: [],
388   banner_removal: [],
389   reject_deletes: []
390
391 config :pleroma, :mrf_keyword,
392   reject: [],
393   federated_timeline_removal: [],
394   replace: []
395
396 config :pleroma, :mrf_emoji,
397   remove_url: [],
398   remove_shortcode: [],
399   federated_timeline_removal_url: [],
400   federated_timeline_removal_shortcode: []
401
402 config :pleroma, :mrf_hashtag,
403   sensitive: ["nsfw"],
404   reject: [],
405   federated_timeline_removal: []
406
407 config :pleroma, :mrf_subchain, match_actor: %{}
408
409 config :pleroma, :mrf_activity_expiration, days: 365
410
411 config :pleroma, :mrf_vocabulary,
412   accept: [],
413   reject: []
414
415 # threshold of 7 days
416 config :pleroma, :mrf_object_age,
417   threshold: 604_800,
418   actions: [:delist, :strip_followers]
419
420 config :pleroma, :mrf_follow_bot, follower_nickname: nil
421
422 config :pleroma, :mrf_inline_quote, template: "<bdi>RT:</bdi> {url}"
423
424 config :pleroma, :mrf_force_mention,
425   mention_parent: true,
426   mention_quoted: true
427
428 config :pleroma, :rich_media,
429   enabled: true,
430   ignore_hosts: [],
431   ignore_tld: ["local", "localdomain", "lan"],
432   parsers: [
433     Pleroma.Web.RichMedia.Parsers.TwitterCard,
434     Pleroma.Web.RichMedia.Parsers.OEmbed
435   ],
436   failure_backoff: 60_000,
437   ttl_setters: [
438     Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl,
439     Pleroma.Web.RichMedia.Parser.TTL.Opengraph
440   ],
441   max_body: 5_000_000
442
443 config :pleroma, :media_proxy,
444   enabled: false,
445   invalidation: [
446     enabled: false,
447     provider: Pleroma.Web.MediaProxy.Invalidation.Script
448   ],
449   proxy_opts: [
450     redirect_on_failure: false,
451     max_body_length: 25 * 1_048_576,
452     # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
453     max_read_duration: 30_000,
454     http: [
455       follow_redirect: true,
456       pool: :media
457     ]
458   ],
459   whitelist: []
460
461 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
462   method: :purge,
463   headers: [],
464   options: []
465
466 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
467   script_path: nil,
468   url_format: nil
469
470 # Note: media preview proxy depends on media proxy to be enabled
471 config :pleroma, :media_preview_proxy,
472   enabled: false,
473   thumbnail_max_width: 600,
474   thumbnail_max_height: 600,
475   image_quality: 85,
476   min_content_length: 100 * 1024
477
478 config :pleroma, :shout,
479   enabled: true,
480   limit: 5_000
481
482 config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
483
484 config :phoenix, :json_library, Jason
485
486 config :phoenix, :filter_parameters, ["password", "confirm"]
487
488 config :pleroma, :gopher,
489   enabled: false,
490   ip: {0, 0, 0, 0},
491   port: 9999
492
493 config :pleroma, Pleroma.Web.Metadata,
494   providers: [
495     Pleroma.Web.Metadata.Providers.OpenGraph,
496     Pleroma.Web.Metadata.Providers.TwitterCard
497   ],
498   unfurl_nsfw: false
499
500 config :pleroma, Pleroma.Web.Preload,
501   providers: [
502     Pleroma.Web.Preload.Providers.Instance
503   ]
504
505 config :pleroma, :http_security,
506   enabled: true,
507   sts: false,
508   sts_max_age: 31_536_000,
509   ct_max_age: 2_592_000,
510   referrer_policy: "same-origin"
511
512 config :cors_plug,
513   max_age: 86_400,
514   methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
515   expose: [
516     "Link",
517     "X-RateLimit-Reset",
518     "X-RateLimit-Limit",
519     "X-RateLimit-Remaining",
520     "X-Request-Id",
521     "Idempotency-Key"
522   ],
523   credentials: true,
524   headers: ["Authorization", "Content-Type", "Idempotency-Key"]
525
526 config :pleroma, Pleroma.User,
527   restricted_nicknames: [
528     ".well-known",
529     "~",
530     "about",
531     "activities",
532     "api",
533     "auth",
534     "check_password",
535     "dev",
536     "friend-requests",
537     "inbox",
538     "internal",
539     "main",
540     "media",
541     "nodeinfo",
542     "notice",
543     "oauth",
544     "objects",
545     "ostatus_subscribe",
546     "pleroma",
547     "proxy",
548     "push",
549     "registration",
550     "relay",
551     "settings",
552     "status",
553     "tag",
554     "user-search",
555     "user_exists",
556     "users",
557     "web",
558     "verify_credentials",
559     "update_credentials",
560     "relationships",
561     "search",
562     "confirmation_resend",
563     "mfa"
564   ],
565   email_blacklist: []
566
567 config :pleroma, Oban,
568   repo: Pleroma.Repo,
569   log: false,
570   queues: [
571     activity_expiration: 10,
572     token_expiration: 5,
573     filter_expiration: 1,
574     backup: 1,
575     federator_incoming: 5,
576     federator_outgoing: 5,
577     ingestion_queue: 50,
578     web_push: 50,
579     mailer: 10,
580     transmogrifier: 20,
581     scheduled_activities: 10,
582     poll_notifications: 10,
583     background: 5,
584     remote_fetcher: 2,
585     attachments_cleanup: 1,
586     new_users_digest: 1,
587     mute_expire: 5,
588     search_indexing: 10,
589     rich_media_expiration: 2
590   ],
591   plugins: [Oban.Plugins.Pruner],
592   crontab: [
593     {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
594     {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
595   ]
596
597 config :pleroma, :workers,
598   retries: [
599     federator_incoming: 5,
600     federator_outgoing: 5,
601     search_indexing: 2
602   ]
603
604 config :pleroma, Pleroma.Formatter,
605   class: false,
606   rel: "ugc",
607   new_window: false,
608   truncate: false,
609   strip_prefix: false,
610   extra: true,
611   validate_tld: :no_scheme
612
613 config :pleroma, :ldap,
614   enabled: System.get_env("LDAP_ENABLED") == "true",
615   host: System.get_env("LDAP_HOST") || "localhost",
616   port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
617   ssl: System.get_env("LDAP_SSL") == "true",
618   sslopts: [],
619   tls: System.get_env("LDAP_TLS") == "true",
620   tlsopts: [],
621   base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
622   uid: System.get_env("LDAP_UID") || "cn"
623
624 oauth_consumer_strategies =
625   System.get_env("OAUTH_CONSUMER_STRATEGIES")
626   |> to_string()
627   |> String.split()
628   |> Enum.map(&hd(String.split(&1, ":")))
629
630 ueberauth_providers =
631   for strategy <- oauth_consumer_strategies do
632     strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
633     strategy_module = String.to_atom(strategy_module_name)
634     {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
635   end
636
637 config :ueberauth,
638        Ueberauth,
639        base_path: "/oauth",
640        providers: ueberauth_providers
641
642 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
643
644 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
645
646 config :pleroma, Pleroma.Emails.UserEmail,
647   logo: nil,
648   styling: %{
649     link_color: "#d8a070",
650     background_color: "#2C3645",
651     content_background_color: "#1B2635",
652     header_color: "#d8a070",
653     text_color: "#b9b9ba",
654     text_muted_color: "#b9b9ba"
655   }
656
657 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
658
659 config :pleroma, Pleroma.PromEx,
660   disabled: false,
661   manual_metrics_start_delay: :no_delay,
662   drop_metrics_groups: [],
663   grafana: [
664     host: System.get_env("GRAFANA_HOST", "http://localhost:3000"),
665     auth_token: System.get_env("GRAFANA_TOKEN"),
666     upload_dashboards_on_start: false,
667     folder_name: "BEAM",
668     annotate_app_lifecycle: true
669   ],
670   metrics_server: [
671     port: 4021,
672     path: "/metrics",
673     protocol: :http,
674     pool_size: 5,
675     cowboy_opts: [],
676     auth_strategy: :none
677   ],
678   datasource: "Prometheus"
679
680 config :pleroma, Pleroma.ScheduledActivity,
681   daily_user_limit: 25,
682   total_user_limit: 300,
683   enabled: true
684
685 config :pleroma, :email_notifications,
686   digest: %{
687     active: false,
688     interval: 7,
689     inactivity_threshold: 7
690   }
691
692 config :pleroma, :oauth2,
693   token_expires_in: 3600 * 24 * 365 * 100,
694   issue_new_refresh_token: true,
695   clean_expired_tokens: false
696
697 config :pleroma, :database, rum_enabled: false
698
699 config :pleroma, :features, improved_hashtag_timeline: :auto
700
701 config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
702
703 config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
704
705 config :pleroma, :env, Mix.env()
706
707 config :http_signatures,
708   adapter: Pleroma.Signature
709
710 config :pleroma, :rate_limit,
711   authentication: {60_000, 15},
712   timeline: {500, 3},
713   search: [{1000, 10}, {1000, 30}],
714   app_account_creation: {1_800_000, 25},
715   relations_actions: {10_000, 10},
716   relation_id_action: {60_000, 2},
717   statuses_actions: {10_000, 15},
718   status_id_action: {60_000, 3},
719   password_reset: {1_800_000, 5},
720   account_confirmation_resend: {8_640_000, 5},
721   ap_routes: {60_000, 15}
722
723 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
724
725 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
726   enabled: true,
727   headers: ["x-forwarded-for"],
728   proxies: [],
729   reserved: [
730     "127.0.0.0/8",
731     "::1/128",
732     "fc00::/7",
733     "10.0.0.0/8",
734     "172.16.0.0/12",
735     "192.168.0.0/16"
736   ]
737
738 config :pleroma, :static_fe, enabled: false
739
740 # Example of frontend configuration
741 # This example will make us serve the primary frontend from the
742 # frontends directory within your `:pleroma, :instance, static_dir`.
743 # e.g., instance/static/frontends/pleroma/develop/
744 #
745 # With no frontend configuration, the bundled files from the `static` directory will
746 # be used.
747 #
748 # config :pleroma, :frontends,
749 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
750 # admin: %{"name" => "admin-fe", "ref" => "stable"},
751 # available: %{...}
752
753 config :pleroma, :frontends,
754   available: %{
755     "kenoma" => %{
756       "name" => "kenoma",
757       "git" => "https://git.pleroma.social/lambadalambda/kenoma",
758       "build_url" =>
759         "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
760       "ref" => "master"
761     },
762     "pleroma-fe" => %{
763       "name" => "pleroma-fe",
764       "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
765       "build_url" =>
766         "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
767       "ref" => "develop"
768     },
769     "fedi-fe" => %{
770       "name" => "fedi-fe",
771       "git" => "https://git.pleroma.social/pleroma/fedi-fe",
772       "build_url" =>
773         "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
774       "ref" => "master",
775       "custom-http-headers" => [
776         {"service-worker-allowed", "/"}
777       ]
778     },
779     "admin-fe" => %{
780       "name" => "admin-fe",
781       "git" => "https://git.pleroma.social/pleroma/admin-fe",
782       "build_url" =>
783         "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
784       "ref" => "develop"
785     },
786     "soapbox" => %{
787       "name" => "soapbox",
788       "git" => "https://gitlab.com/soapbox-pub/soapbox",
789       "build_url" =>
790         "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
791       "ref" => "v3.0.0-beta.1",
792       "build_dir" => "static"
793     },
794     "glitch-lily" => %{
795       "name" => "glitch-lily",
796       "git" => "https://lily-is.land/infra/glitch-lily",
797       "build_url" =>
798         "https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
799       "ref" => "servant",
800       "build_dir" => "public"
801     }
802   }
803
804 config :pleroma, :web_cache_ttl,
805   activity_pub: nil,
806   activity_pub_question: 30_000
807
808 config :pleroma, :modules, runtime_dir: "instance/modules"
809
810 config :pleroma, configurable_from_database: false
811
812 config :pleroma, Pleroma.Repo,
813   parameters: [gin_fuzzy_search_limit: "500", jit: "off"],
814   prepare: :unnamed
815
816 config :pleroma, :connections_pool,
817   reclaim_multiplier: 0.1,
818   connection_acquisition_wait: 250,
819   connection_acquisition_retries: 5,
820   max_connections: 250,
821   max_idle_time: 30_000,
822   retry: 0,
823   connect_timeout: 5_000
824
825 config :pleroma, :pools,
826   federation: [
827     size: 50,
828     max_waiting: 10,
829     recv_timeout: 10_000
830   ],
831   media: [
832     size: 50,
833     max_waiting: 20,
834     recv_timeout: 15_000
835   ],
836   upload: [
837     size: 25,
838     max_waiting: 5,
839     recv_timeout: 15_000
840   ],
841   default: [
842     size: 10,
843     max_waiting: 2,
844     recv_timeout: 5_000
845   ]
846
847 config :pleroma, :hackney_pools,
848   federation: [
849     max_connections: 50,
850     timeout: 150_000
851   ],
852   media: [
853     max_connections: 50,
854     timeout: 150_000
855   ],
856   upload: [
857     max_connections: 25,
858     timeout: 300_000
859   ]
860
861 config :pleroma, :majic_pool, size: 2
862
863 private_instance? = :if_instance_is_private
864
865 config :pleroma, :restrict_unauthenticated,
866   timelines: %{local: private_instance?, federated: private_instance?},
867   profiles: %{local: private_instance?, remote: private_instance?},
868   activities: %{local: private_instance?, remote: private_instance?}
869
870 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
871
872 config :pleroma, :mrf,
873   policies: [
874     Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
875     Pleroma.Web.ActivityPub.MRF.TagPolicy,
876     Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
877   ],
878   transparency: true,
879   transparency_exclusions: []
880
881 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
882
883 config :ex_aws, http_client: Pleroma.HTTP.ExAws
884
885 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
886
887 config :pleroma, :instances_favicons, enabled: false
888
889 config :floki, :html_parser, Floki.HTMLParser.FastHtml
890
891 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
892
893 config :pleroma, Pleroma.User.Backup,
894   purge_after_days: 30,
895   limit_days: 7,
896   dir: nil,
897   process_wait_time: 30_000,
898   process_chunk_size: 100
899
900 config :pleroma, ConcurrentLimiter, [
901   {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
902   {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]},
903   {Pleroma.Search, [max_running: 30, max_waiting: 50]}
904 ]
905
906 config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
907
908 config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
909
910 config :pleroma, Pleroma.Search.Meilisearch,
911   url: "http://127.0.0.1:7700/",
912   private_key: nil,
913   initial_indexing_chunk_size: 100_000
914
915 config :pleroma, Pleroma.Application,
916   background_migrators: true,
917   internal_fetch: true,
918   load_custom_modules: true,
919   max_restarts: 3,
920   streamer_registry: true
921
922 config :pleroma, Pleroma.Uploaders.Uploader, timeout: 30_000
923
924 # Import environment specific config. This must remain at the bottom
925 # of this file so it overrides the configuration defined above.
926 import_config "#{Mix.env()}.exs"