First
[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 websocket_config = [
114   path: "/websocket",
115   serializer: [
116     {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
117     {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
118   ],
119   timeout: 60_000,
120   transport_log: false,
121   compress: false
122 ]
123
124 # Configures the endpoint
125 config :pleroma, Pleroma.Web.Endpoint,
126   url: [host: "localhost"],
127   http: [
128     ip: {127, 0, 0, 1},
129     dispatch: [
130       {:_,
131        [
132          {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
133          {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
134           {Phoenix.Transports.WebSocket,
135            {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
136          {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
137        ]}
138     ]
139   ],
140   protocol: "https",
141   secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
142   live_view: [signing_salt: "U5ELgdEwTD3n1+D5s0rY0AMg8/y1STxZ3Zvsl3bWh+oBcGrYdil0rXqPMRd3Glcq"],
143   signing_salt: "CqaoopA2",
144   render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
145   pubsub_server: Pleroma.PubSub,
146   secure_cookie_flag: true,
147   extra_cookie_attrs: [
148     "SameSite=Lax"
149   ]
150
151 # Configures Elixir's Logger
152 config :logger, :console,
153   level: :debug,
154   format: "\n$time $metadata[$level] $message\n",
155   metadata: [:request_id]
156
157 config :logger, :ex_syslogger,
158   level: :debug,
159   ident: "pleroma",
160   format: "$metadata[$level] $message",
161   metadata: [:request_id]
162
163 config :mime, :types, %{
164   "application/xml" => ["xml"],
165   "application/xrd+xml" => ["xrd+xml"],
166   "application/jrd+json" => ["jrd+json"],
167   "application/activity+json" => ["activity+json"],
168   "application/ld+json" => ["activity+json"]
169 }
170
171 config :tesla, adapter: Tesla.Adapter.Hackney
172
173 # Configures http settings, upstream proxy etc.
174 config :pleroma, :http,
175   proxy_url: nil,
176   send_user_agent: true,
177   user_agent: :default,
178   adapter: []
179
180 config :pleroma, :instance,
181   name: "Pleroma",
182   email: "example@example.com",
183   notify_email: "noreply@example.com",
184   description: "Pleroma: An efficient and flexible fediverse server",
185   short_description: "",
186   background_image: "/images/city.jpg",
187   instance_thumbnail: "/instance/thumbnail.jpeg",
188   limit: 5_000,
189   description_limit: 5_000,
190   remote_limit: 100_000,
191   upload_limit: 16_000_000,
192   avatar_upload_limit: 2_000_000,
193   background_upload_limit: 4_000_000,
194   banner_upload_limit: 4_000_000,
195   poll_limits: %{
196     max_options: 20,
197     max_option_chars: 200,
198     min_expiration: 0,
199     max_expiration: 365 * 24 * 60 * 60
200   },
201   registrations_open: true,
202   invites_enabled: false,
203   account_activation_required: false,
204   account_approval_required: false,
205   federating: true,
206   federation_incoming_replies_max_depth: 100,
207   federation_reachability_timeout_days: 7,
208   federation_publisher_modules: [
209     Pleroma.Web.ActivityPub.Publisher
210   ],
211   allow_relay: true,
212   public: true,
213   quarantined_instances: [],
214   static_dir: "instance/static/",
215   allowed_post_formats: [
216     "text/plain",
217     "text/html",
218     "text/markdown",
219     "text/bbcode"
220   ],
221   autofollowed_nicknames: [],
222   autofollowing_nicknames: [],
223   max_pinned_statuses: 1,
224   attachment_links: false,
225   max_report_comment_size: 1000,
226   report_strip_status: true,
227   safe_dm_mentions: false,
228   healthcheck: false,
229   remote_post_retention_days: 90,
230   skip_thread_containment: true,
231   limit_to_local_content: :unauthenticated,
232   user_bio_length: 5000,
233   user_name_length: 100,
234   max_account_fields: 10,
235   max_remote_account_fields: 20,
236   account_field_name_length: 512,
237   account_field_value_length: 2048,
238   registration_reason_length: 500,
239   external_user_synchronization: true,
240   extended_nickname_format: true,
241   cleanup_attachments: false,
242   multi_factor_authentication: [
243     totp: [
244       # digits 6 or 8
245       digits: 6,
246       period: 30
247     ],
248     backup_codes: [
249       number: 5,
250       length: 16
251     ]
252   ],
253   show_reactions: true,
254   password_reset_token_validity: 60 * 60 * 24,
255   profile_directory: true,
256   admin_privileges: [
257     :users_read,
258     :users_manage_invites,
259     :users_manage_activation_state,
260     :users_manage_tags,
261     :users_manage_credentials,
262     :users_delete,
263     :messages_read,
264     :messages_delete,
265     :instances_delete,
266     :reports_manage_reports,
267     :moderation_log_read,
268     :announcements_manage_announcements,
269     :emoji_manage_emoji,
270     :statistics_read
271   ],
272   moderator_privileges: [:messages_delete, :reports_manage_reports],
273   max_endorsed_users: 20,
274   birthday_required: false,
275   birthday_min_age: 0,
276   max_media_attachments: 1_000
277
278 config :pleroma, :welcome,
279   direct_message: [
280     enabled: false,
281     sender_nickname: nil,
282     message: nil
283   ],
284   chat_message: [
285     enabled: false,
286     sender_nickname: nil,
287     message: nil
288   ],
289   email: [
290     enabled: false,
291     sender: nil,
292     subject: "Welcome to <%= instance_name %>",
293     html: "Welcome to <%= instance_name %>",
294     text: "Welcome to <%= instance_name %>"
295   ]
296
297 config :pleroma, :feed,
298   post_title: %{
299     max_length: 100,
300     omission: "..."
301   }
302
303 config :pleroma, :markup,
304   # XXX - unfortunately, inline images must be enabled by default right now, because
305   # of custom emoji.  Issue #275 discusses defanging that somehow.
306   allow_inline_images: true,
307   allow_headings: false,
308   allow_tables: false,
309   allow_fonts: false,
310   scrub_policy: [
311     Pleroma.HTML.Scrubber.Default,
312     Pleroma.HTML.Transform.MediaProxy
313   ]
314
315 config :pleroma, :frontend_configurations,
316   pleroma_fe: %{
317     alwaysShowSubjectInput: true,
318     background: "/images/city.jpg",
319     collapseMessageWithSubject: false,
320     disableChat: false,
321     greentext: false,
322     hideFilteredStatuses: false,
323     hideMutedPosts: false,
324     hidePostStats: false,
325     hideSitename: false,
326     hideUserStats: false,
327     loginMethod: "password",
328     logo: "/static/logo.svg",
329     logoMargin: ".1em",
330     logoMask: true,
331     minimalScopesMode: false,
332     noAttachmentLinks: false,
333     nsfwCensorImage: "",
334     postContentType: "text/plain",
335     redirectRootLogin: "/main/friends",
336     redirectRootNoLogin: "/main/all",
337     scopeCopy: true,
338     sidebarRight: false,
339     showFeaturesPanel: true,
340     showInstanceSpecificPanel: false,
341     subjectLineBehavior: "email",
342     theme: "pleroma-dark",
343     webPushNotifications: false
344   }
345
346 config :pleroma, :assets,
347   mascots: [
348     pleroma_fox_tan: %{
349       url: "/images/pleroma-fox-tan-smol.png",
350       mime_type: "image/png"
351     },
352     pleroma_fox_tan_shy: %{
353       url: "/images/pleroma-fox-tan-shy.png",
354       mime_type: "image/png"
355     }
356   ],
357   default_mascot: :pleroma_fox_tan
358
359 config :pleroma, :manifest,
360   icons: [
361     %{
362       src: "/static/logo.svg",
363       type: "image/svg+xml"
364     }
365   ],
366   theme_color: "#282c37",
367   background_color: "#191b22"
368
369 config :pleroma, :activitypub,
370   unfollow_blocked: true,
371   outgoing_blocks: true,
372   blockers_visible: true,
373   follow_handshake_timeout: 500,
374   note_replies_output_limit: 5,
375   sign_object_fetches: true,
376   authorized_fetch_mode: false
377
378 config :pleroma, :streamer,
379   workers: 3,
380   overflow_workers: 2
381
382 config :pleroma, :user, deny_follow_blocked: true
383
384 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
385
386 config :pleroma, :mrf_rejectnonpublic,
387   allow_followersonly: false,
388   allow_direct: false
389
390 config :pleroma, :mrf_hellthread,
391   delist_threshold: 10,
392   reject_threshold: 20
393
394 config :pleroma, :mrf_simple,
395   media_removal: [],
396   media_nsfw: [],
397   federated_timeline_removal: [],
398   report_removal: [],
399   reject: [],
400   followers_only: [],
401   accept: [],
402   avatar_removal: [],
403   banner_removal: [],
404   reject_deletes: []
405
406 config :pleroma, :mrf_keyword,
407   reject: [],
408   federated_timeline_removal: [],
409   replace: []
410
411 config :pleroma, :mrf_hashtag,
412   sensitive: ["nsfw"],
413   reject: [],
414   federated_timeline_removal: []
415
416 config :pleroma, :mrf_subchain, match_actor: %{}
417
418 config :pleroma, :mrf_activity_expiration, days: 365
419
420 config :pleroma, :mrf_vocabulary,
421   accept: [],
422   reject: []
423
424 # threshold of 7 days
425 config :pleroma, :mrf_object_age,
426   threshold: 604_800,
427   actions: [:delist, :strip_followers]
428
429 config :pleroma, :mrf_follow_bot, follower_nickname: nil
430
431 config :pleroma, :rich_media,
432   enabled: true,
433   ignore_hosts: [],
434   ignore_tld: ["local", "localdomain", "lan"],
435   parsers: [
436     Pleroma.Web.RichMedia.Parsers.TwitterCard,
437     Pleroma.Web.RichMedia.Parsers.OEmbed
438   ],
439   failure_backoff: 60_000,
440   ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
441
442 config :pleroma, :media_proxy,
443   enabled: false,
444   invalidation: [
445     enabled: false,
446     provider: Pleroma.Web.MediaProxy.Invalidation.Script
447   ],
448   proxy_opts: [
449     redirect_on_failure: false,
450     max_body_length: 25 * 1_048_576,
451     # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
452     max_read_duration: 30_000,
453     http: [
454       follow_redirect: true,
455       pool: :media
456     ]
457   ],
458   whitelist: []
459
460 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
461   method: :purge,
462   headers: [],
463   options: []
464
465 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
466   script_path: nil,
467   url_format: nil
468
469 # Note: media preview proxy depends on media proxy to be enabled
470 config :pleroma, :media_preview_proxy,
471   enabled: false,
472   thumbnail_max_width: 600,
473   thumbnail_max_height: 600,
474   image_quality: 85,
475   min_content_length: 100 * 1024
476
477 config :pleroma, :shout,
478   enabled: true,
479   limit: 5_000
480
481 config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
482
483 config :phoenix, :json_library, Jason
484
485 config :phoenix, :filter_parameters, ["password", "confirm"]
486
487 config :pleroma, :gopher,
488   enabled: false,
489   ip: {0, 0, 0, 0},
490   port: 9999
491
492 config :pleroma, Pleroma.Web.Metadata,
493   providers: [
494     Pleroma.Web.Metadata.Providers.OpenGraph,
495     Pleroma.Web.Metadata.Providers.TwitterCard
496   ],
497   unfurl_nsfw: false
498
499 config :pleroma, Pleroma.Web.Preload,
500   providers: [
501     Pleroma.Web.Preload.Providers.Instance
502   ]
503
504 config :pleroma, :http_security,
505   enabled: true,
506   sts: false,
507   sts_max_age: 31_536_000,
508   ct_max_age: 2_592_000,
509   referrer_policy: "same-origin"
510
511 config :cors_plug,
512   max_age: 86_400,
513   methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
514   expose: [
515     "Link",
516     "X-RateLimit-Reset",
517     "X-RateLimit-Limit",
518     "X-RateLimit-Remaining",
519     "X-Request-Id",
520     "Idempotency-Key"
521   ],
522   credentials: true,
523   headers: ["Authorization", "Content-Type", "Idempotency-Key"]
524
525 config :pleroma, Pleroma.User,
526   restricted_nicknames: [
527     ".well-known",
528     "~",
529     "about",
530     "activities",
531     "api",
532     "auth",
533     "check_password",
534     "dev",
535     "friend-requests",
536     "inbox",
537     "internal",
538     "main",
539     "media",
540     "nodeinfo",
541     "notice",
542     "oauth",
543     "objects",
544     "ostatus_subscribe",
545     "pleroma",
546     "proxy",
547     "push",
548     "registration",
549     "relay",
550     "settings",
551     "status",
552     "tag",
553     "user-search",
554     "user_exists",
555     "users",
556     "web",
557     "verify_credentials",
558     "update_credentials",
559     "relationships",
560     "search",
561     "confirmation_resend",
562     "mfa"
563   ],
564   email_blacklist: []
565
566 config :pleroma, Oban,
567   repo: Pleroma.Repo,
568   log: false,
569   queues: [
570     activity_expiration: 10,
571     token_expiration: 5,
572     filter_expiration: 1,
573     backup: 1,
574     federator_incoming: 5,
575     federator_outgoing: 5,
576     ingestion_queue: 50,
577     web_push: 50,
578     mailer: 10,
579     transmogrifier: 20,
580     scheduled_activities: 10,
581     poll_notifications: 10,
582     background: 5,
583     remote_fetcher: 2,
584     attachments_cleanup: 1,
585     new_users_digest: 1,
586     mute_expire: 5
587   ],
588   plugins: [Oban.Plugins.Pruner],
589   crontab: [
590     {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
591     {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
592   ]
593
594 config :pleroma, :workers,
595   retries: [
596     federator_incoming: 5,
597     federator_outgoing: 5
598   ]
599
600 config :pleroma, Pleroma.Formatter,
601   class: false,
602   rel: "ugc",
603   new_window: false,
604   truncate: false,
605   strip_prefix: false,
606   extra: true,
607   validate_tld: :no_scheme
608
609 config :pleroma, :ldap,
610   enabled: System.get_env("LDAP_ENABLED") == "true",
611   host: System.get_env("LDAP_HOST") || "localhost",
612   port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
613   ssl: System.get_env("LDAP_SSL") == "true",
614   sslopts: [],
615   tls: System.get_env("LDAP_TLS") == "true",
616   tlsopts: [],
617   base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
618   uid: System.get_env("LDAP_UID") || "cn"
619
620 config :esshd,
621   enabled: false
622
623 oauth_consumer_strategies =
624   System.get_env("OAUTH_CONSUMER_STRATEGIES")
625   |> to_string()
626   |> String.split()
627   |> Enum.map(&hd(String.split(&1, ":")))
628
629 ueberauth_providers =
630   for strategy <- oauth_consumer_strategies do
631     strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
632     strategy_module = String.to_atom(strategy_module_name)
633     {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
634   end
635
636 config :ueberauth,
637        Ueberauth,
638        base_path: "/oauth",
639        providers: ueberauth_providers
640
641 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
642
643 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
644
645 config :pleroma, Pleroma.Emails.UserEmail,
646   logo: nil,
647   styling: %{
648     link_color: "#d8a070",
649     background_color: "#2C3645",
650     content_background_color: "#1B2635",
651     header_color: "#d8a070",
652     text_color: "#b9b9ba",
653     text_muted_color: "#b9b9ba"
654   }
655
656 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
657
658 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
659   enabled: false,
660   auth: false,
661   ip_whitelist: [],
662   path: "/api/pleroma/app_metrics",
663   format: :text
664
665 config :pleroma, Pleroma.ScheduledActivity,
666   daily_user_limit: 25,
667   total_user_limit: 300,
668   enabled: true
669
670 config :pleroma, :email_notifications,
671   digest: %{
672     active: false,
673     interval: 7,
674     inactivity_threshold: 7
675   }
676
677 config :pleroma, :oauth2,
678   token_expires_in: 3600 * 24 * 365 * 100,
679   issue_new_refresh_token: true,
680   clean_expired_tokens: false
681
682 config :pleroma, :database, rum_enabled: false
683
684 config :pleroma, :features, improved_hashtag_timeline: :auto
685
686 config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
687
688 config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
689
690 config :pleroma, :env, Mix.env()
691
692 config :http_signatures,
693   adapter: Pleroma.Signature
694
695 config :pleroma, :rate_limit,
696   authentication: {60_000, 15},
697   timeline: {500, 3},
698   search: [{1000, 10}, {1000, 30}],
699   app_account_creation: {1_800_000, 25},
700   relations_actions: {10_000, 10},
701   relation_id_action: {60_000, 2},
702   statuses_actions: {10_000, 15},
703   status_id_action: {60_000, 3},
704   password_reset: {1_800_000, 5},
705   account_confirmation_resend: {8_640_000, 5},
706   ap_routes: {60_000, 15}
707
708 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
709
710 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
711   enabled: true,
712   headers: ["x-forwarded-for"],
713   proxies: [],
714   reserved: [
715     "127.0.0.0/8",
716     "::1/128",
717     "fc00::/7",
718     "10.0.0.0/8",
719     "172.16.0.0/12",
720     "192.168.0.0/16"
721   ]
722
723 config :pleroma, :static_fe, enabled: false
724
725 # Example of frontend configuration
726 # This example will make us serve the primary frontend from the
727 # frontends directory within your `:pleroma, :instance, static_dir`.
728 # e.g., instance/static/frontends/pleroma/develop/
729 #
730 # With no frontend configuration, the bundled files from the `static` directory will
731 # be used.
732 #
733 # config :pleroma, :frontends,
734 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
735 # admin: %{"name" => "admin-fe", "ref" => "stable"},
736 # available: %{...}
737
738 config :pleroma, :frontends,
739   available: %{
740     "kenoma" => %{
741       "name" => "kenoma",
742       "git" => "https://git.pleroma.social/lambadalambda/kenoma",
743       "build_url" =>
744         "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
745       "ref" => "master"
746     },
747     "pleroma-fe" => %{
748       "name" => "pleroma-fe",
749       "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
750       "build_url" =>
751         "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
752       "ref" => "develop"
753     },
754     "fedi-fe" => %{
755       "name" => "fedi-fe",
756       "git" => "https://git.pleroma.social/pleroma/fedi-fe",
757       "build_url" =>
758         "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
759       "ref" => "master",
760       "custom-http-headers" => [
761         {"service-worker-allowed", "/"}
762       ]
763     },
764     "admin-fe" => %{
765       "name" => "admin-fe",
766       "git" => "https://git.pleroma.social/pleroma/admin-fe",
767       "build_url" =>
768         "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
769       "ref" => "develop"
770     },
771     "soapbox" => %{
772       "name" => "soapbox",
773       "git" => "https://gitlab.com/soapbox-pub/soapbox",
774       "build_url" =>
775         "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
776       "ref" => "v3.0.0-beta.1",
777       "build_dir" => "static"
778     },
779     "glitch-lily" => %{
780       "name" => "glitch-lily",
781       "git" => "https://lily-is.land/infra/glitch-lily",
782       "build_url" =>
783         "https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
784       "ref" => "servant",
785       "build_dir" => "public"
786     }
787   }
788
789 config :pleroma, :web_cache_ttl,
790   activity_pub: nil,
791   activity_pub_question: 30_000
792
793 config :pleroma, :modules, runtime_dir: "instance/modules"
794
795 config :pleroma, configurable_from_database: false
796
797 config :pleroma, Pleroma.Repo,
798   parameters: [gin_fuzzy_search_limit: "500"],
799   prepare: :unnamed
800
801 config :pleroma, :connections_pool,
802   reclaim_multiplier: 0.1,
803   connection_acquisition_wait: 250,
804   connection_acquisition_retries: 5,
805   max_connections: 250,
806   max_idle_time: 30_000,
807   retry: 0,
808   connect_timeout: 5_000
809
810 config :pleroma, :pools,
811   federation: [
812     size: 50,
813     max_waiting: 10,
814     recv_timeout: 10_000
815   ],
816   media: [
817     size: 50,
818     max_waiting: 20,
819     recv_timeout: 15_000
820   ],
821   upload: [
822     size: 25,
823     max_waiting: 5,
824     recv_timeout: 15_000
825   ],
826   default: [
827     size: 10,
828     max_waiting: 2,
829     recv_timeout: 5_000
830   ]
831
832 config :pleroma, :hackney_pools,
833   federation: [
834     max_connections: 50,
835     timeout: 150_000
836   ],
837   media: [
838     max_connections: 50,
839     timeout: 150_000
840   ],
841   upload: [
842     max_connections: 25,
843     timeout: 300_000
844   ]
845
846 config :pleroma, :majic_pool, size: 2
847
848 private_instance? = :if_instance_is_private
849
850 config :pleroma, :restrict_unauthenticated,
851   timelines: %{local: private_instance?, federated: private_instance?},
852   profiles: %{local: private_instance?, remote: private_instance?},
853   activities: %{local: private_instance?, remote: private_instance?}
854
855 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
856
857 config :pleroma, :mrf,
858   policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy],
859   transparency: true,
860   transparency_exclusions: []
861
862 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
863
864 config :ex_aws, http_client: Pleroma.HTTP.ExAws
865
866 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
867
868 config :pleroma, :instances_favicons, enabled: false
869
870 config :floki, :html_parser, Floki.HTMLParser.FastHtml
871
872 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
873
874 config :pleroma, Pleroma.User.Backup,
875   purge_after_days: 30,
876   limit_days: 7,
877   dir: nil
878
879 config :pleroma, ConcurrentLimiter, [
880   {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
881   {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
882 ]
883
884 config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
885
886 # Import environment specific config. This must remain at the bottom
887 # of this file so it overrides the configuration defined above.
888
889 import_config "#{Mix.env()}.exs"
890