total rebase
[anni] / config / config.exs.orig
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
357 config :pleroma, :streamer,
358   workers: 3,
359   overflow_workers: 2
360
361 config :pleroma, :user, deny_follow_blocked: true
362
363 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
364
365 config :pleroma, :mrf_rejectnonpublic,
366   allow_followersonly: false,
367   allow_direct: false
368
369 config :pleroma, :mrf_hellthread,
370   delist_threshold: 10,
371   reject_threshold: 20
372
373 config :pleroma, :mrf_simple,
374   media_removal: [],
375   media_nsfw: [],
376   federated_timeline_removal: [],
377   report_removal: [],
378   reject: [],
379   followers_only: [],
380   accept: [],
381   avatar_removal: [],
382   banner_removal: [],
383   reject_deletes: []
384
385 config :pleroma, :mrf_keyword,
386   reject: [],
387   federated_timeline_removal: [],
388   replace: []
389
390 config :pleroma, :mrf_emoji,
391   remove_url: [],
392   remove_shortcode: [],
393   federated_timeline_removal_url: [],
394   federated_timeline_removal_shortcode: []
395
396 config :pleroma, :mrf_hashtag,
397   sensitive: ["nsfw"],
398   reject: [],
399   federated_timeline_removal: []
400
401 config :pleroma, :mrf_subchain, match_actor: %{}
402
403 config :pleroma, :mrf_activity_expiration, days: 365
404
405 config :pleroma, :mrf_vocabulary,
406   accept: [],
407   reject: []
408
409 # threshold of 7 days
410 config :pleroma, :mrf_object_age,
411   threshold: 604_800,
412   actions: [:delist, :strip_followers]
413
414 config :pleroma, :mrf_follow_bot, follower_nickname: nil
415
416 config :pleroma, :mrf_inline_quote, template: "<bdi>RT:</bdi> {url}"
417
418 config :pleroma, :mrf_force_mention,
419   mention_parent: true,
420   mention_quoted: true
421
422 config :pleroma, :rich_media,
423   enabled: true,
424   ignore_hosts: [],
425   ignore_tld: ["local", "localdomain", "lan"],
426   parsers: [
427     Pleroma.Web.RichMedia.Parsers.TwitterCard,
428     Pleroma.Web.RichMedia.Parsers.OEmbed
429   ],
430   failure_backoff: 60_000,
431   ttl_setters: [
432     Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl,
433     Pleroma.Web.RichMedia.Parser.TTL.Opengraph
434   ],
435   max_body: 5_000_000
436
437 config :pleroma, :media_proxy,
438   enabled: false,
439   invalidation: [
440     enabled: false,
441     provider: Pleroma.Web.MediaProxy.Invalidation.Script
442   ],
443   proxy_opts: [
444     redirect_on_failure: false,
445     max_body_length: 25 * 1_048_576,
446     # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
447     max_read_duration: 30_000,
448     http: [
449       follow_redirect: true,
450       pool: :media
451     ]
452   ],
453   whitelist: []
454
455 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
456   method: :purge,
457   headers: [],
458   options: []
459
460 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
461   script_path: nil,
462   url_format: nil
463
464 # Note: media preview proxy depends on media proxy to be enabled
465 config :pleroma, :media_preview_proxy,
466   enabled: false,
467   thumbnail_max_width: 600,
468   thumbnail_max_height: 600,
469   image_quality: 85,
470   min_content_length: 100 * 1024
471
472 config :pleroma, :shout,
473   enabled: true,
474   limit: 5_000
475
476 config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
477
478 config :phoenix, :json_library, Jason
479
480 config :phoenix, :filter_parameters, ["password", "confirm"]
481
482 config :pleroma, :gopher,
483   enabled: false,
484   ip: {0, 0, 0, 0},
485   port: 9999
486
487 config :pleroma, Pleroma.Web.Metadata,
488   providers: [
489     Pleroma.Web.Metadata.Providers.OpenGraph,
490     Pleroma.Web.Metadata.Providers.TwitterCard
491   ],
492   unfurl_nsfw: false
493
494 config :pleroma, Pleroma.Web.Preload,
495   providers: [
496     Pleroma.Web.Preload.Providers.Instance
497   ]
498
499 config :pleroma, :http_security,
500   enabled: true,
501   sts: false,
502   sts_max_age: 31_536_000,
503   ct_max_age: 2_592_000,
504   referrer_policy: "same-origin"
505
506 config :cors_plug,
507   max_age: 86_400,
508   methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
509   expose: [
510     "Link",
511     "X-RateLimit-Reset",
512     "X-RateLimit-Limit",
513     "X-RateLimit-Remaining",
514     "X-Request-Id",
515     "Idempotency-Key"
516   ],
517   credentials: true,
518   headers: ["Authorization", "Content-Type", "Idempotency-Key"]
519
520 config :pleroma, Pleroma.User,
521   restricted_nicknames: [
522     ".well-known",
523     "~",
524     "about",
525     "activities",
526     "api",
527     "auth",
528     "check_password",
529     "dev",
530     "friend-requests",
531     "inbox",
532     "internal",
533     "main",
534     "media",
535     "nodeinfo",
536     "notice",
537     "oauth",
538     "objects",
539     "ostatus_subscribe",
540     "pleroma",
541     "proxy",
542     "push",
543     "registration",
544     "relay",
545     "settings",
546     "status",
547     "tag",
548     "user-search",
549     "user_exists",
550     "users",
551     "web",
552     "verify_credentials",
553     "update_credentials",
554     "relationships",
555     "search",
556     "confirmation_resend",
557     "mfa"
558   ],
559   email_blacklist: []
560
561 config :pleroma, Oban,
562   repo: Pleroma.Repo,
563   log: false,
564   queues: [
565     activity_expiration: 10,
566     token_expiration: 5,
567     filter_expiration: 1,
568     backup: 1,
569     federator_incoming: 5,
570     federator_outgoing: 5,
571     ingestion_queue: 50,
572     web_push: 50,
573     mailer: 10,
574     transmogrifier: 20,
575     scheduled_activities: 10,
576     poll_notifications: 10,
577     background: 5,
578     remote_fetcher: 2,
579     attachments_cleanup: 1,
580     new_users_digest: 1,
581     mute_expire: 5,
582     search_indexing: 10,
583     rich_media_expiration: 2
584   ],
585   plugins: [Oban.Plugins.Pruner],
586   crontab: [
587     {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
588     {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
589   ]
590
591 config :pleroma, :workers,
592   retries: [
593     federator_incoming: 5,
594     federator_outgoing: 5,
595     search_indexing: 2
596   ]
597
598 config :pleroma, Pleroma.Formatter,
599   class: false,
600   rel: "ugc",
601   new_window: false,
602   truncate: false,
603   strip_prefix: false,
604   extra: true,
605   validate_tld: :no_scheme
606
607 config :pleroma, :ldap,
608   enabled: System.get_env("LDAP_ENABLED") == "true",
609   host: System.get_env("LDAP_HOST") || "localhost",
610   port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
611   ssl: System.get_env("LDAP_SSL") == "true",
612   sslopts: [],
613   tls: System.get_env("LDAP_TLS") == "true",
614   tlsopts: [],
615   base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
616   uid: System.get_env("LDAP_UID") || "cn"
617
618 oauth_consumer_strategies =
619   System.get_env("OAUTH_CONSUMER_STRATEGIES")
620   |> to_string()
621   |> String.split()
622   |> Enum.map(&hd(String.split(&1, ":")))
623
624 ueberauth_providers =
625   for strategy <- oauth_consumer_strategies do
626     strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
627     strategy_module = String.to_atom(strategy_module_name)
628     {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
629   end
630
631 config :ueberauth,
632        Ueberauth,
633        base_path: "/oauth",
634        providers: ueberauth_providers
635
636 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
637
638 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
639
640 config :pleroma, Pleroma.Emails.UserEmail,
641   logo: nil,
642   styling: %{
643     link_color: "#d8a070",
644     background_color: "#2C3645",
645     content_background_color: "#1B2635",
646     header_color: "#d8a070",
647     text_color: "#b9b9ba",
648     text_muted_color: "#b9b9ba"
649   }
650
651 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
652
653 config :pleroma, Pleroma.PromEx,
654   disabled: false,
655   manual_metrics_start_delay: :no_delay,
656   drop_metrics_groups: [],
657   grafana: [
658     host: System.get_env("GRAFANA_HOST", "http://localhost:3000"),
659     auth_token: System.get_env("GRAFANA_TOKEN"),
660     upload_dashboards_on_start: false,
661     folder_name: "BEAM",
662     annotate_app_lifecycle: true
663   ],
664   metrics_server: [
665     port: 4021,
666     path: "/metrics",
667     protocol: :http,
668     pool_size: 5,
669     cowboy_opts: [],
670     auth_strategy: :none
671   ],
672   datasource: "Prometheus"
673
674 config :pleroma, Pleroma.ScheduledActivity,
675   daily_user_limit: 25,
676   total_user_limit: 300,
677   enabled: true
678
679 config :pleroma, :email_notifications,
680   digest: %{
681     active: false,
682     interval: 7,
683     inactivity_threshold: 7
684   }
685
686 config :pleroma, :oauth2,
687   token_expires_in: 3600 * 24 * 365 * 100,
688   issue_new_refresh_token: true,
689   clean_expired_tokens: false
690
691 config :pleroma, :database, rum_enabled: false
692
693 config :pleroma, :features, improved_hashtag_timeline: :auto
694
695 config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
696
697 config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
698
699 config :pleroma, :env, Mix.env()
700
701 config :http_signatures,
702   adapter: Pleroma.Signature
703
704 config :pleroma, :rate_limit,
705   authentication: {60_000, 15},
706   timeline: {500, 3},
707   search: [{1000, 10}, {1000, 30}],
708   app_account_creation: {1_800_000, 25},
709   relations_actions: {10_000, 10},
710   relation_id_action: {60_000, 2},
711   statuses_actions: {10_000, 15},
712   status_id_action: {60_000, 3},
713   password_reset: {1_800_000, 5},
714   account_confirmation_resend: {8_640_000, 5},
715   ap_routes: {60_000, 15}
716
717 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
718
719 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
720   enabled: true,
721   headers: ["x-forwarded-for"],
722   proxies: [],
723   reserved: [
724     "127.0.0.0/8",
725     "::1/128",
726     "fc00::/7",
727     "10.0.0.0/8",
728     "172.16.0.0/12",
729     "192.168.0.0/16"
730   ]
731
732 config :pleroma, :static_fe, enabled: false
733
734 # Example of frontend configuration
735 # This example will make us serve the primary frontend from the
736 # frontends directory within your `:pleroma, :instance, static_dir`.
737 # e.g., instance/static/frontends/pleroma/develop/
738 #
739 # With no frontend configuration, the bundled files from the `static` directory will
740 # be used.
741 #
742 # config :pleroma, :frontends,
743 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
744 # admin: %{"name" => "admin-fe", "ref" => "stable"},
745 # available: %{...}
746
747 config :pleroma, :frontends,
748   available: %{
749     "kenoma" => %{
750       "name" => "kenoma",
751       "git" => "https://git.pleroma.social/lambadalambda/kenoma",
752       "build_url" =>
753         "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
754       "ref" => "master"
755     },
756     "pleroma-fe" => %{
757       "name" => "pleroma-fe",
758       "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
759       "build_url" =>
760         "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
761       "ref" => "develop"
762     },
763     "fedi-fe" => %{
764       "name" => "fedi-fe",
765       "git" => "https://git.pleroma.social/pleroma/fedi-fe",
766       "build_url" =>
767         "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
768       "ref" => "master",
769       "custom-http-headers" => [
770         {"service-worker-allowed", "/"}
771       ]
772     },
773     "admin-fe" => %{
774       "name" => "admin-fe",
775       "git" => "https://git.pleroma.social/pleroma/admin-fe",
776       "build_url" =>
777         "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
778       "ref" => "develop"
779     },
780     "soapbox" => %{
781       "name" => "soapbox",
782       "git" => "https://gitlab.com/soapbox-pub/soapbox",
783       "build_url" =>
784         "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
785       "ref" => "v3.0.0-beta.1",
786       "build_dir" => "static"
787     },
788     "glitch-lily" => %{
789       "name" => "glitch-lily",
790       "git" => "https://lily-is.land/infra/glitch-lily",
791       "build_url" =>
792         "https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
793       "ref" => "servant",
794       "build_dir" => "public"
795     }
796   }
797
798 config :pleroma, :web_cache_ttl,
799   activity_pub: nil,
800   activity_pub_question: 30_000
801
802 config :pleroma, :modules, runtime_dir: "instance/modules"
803
804 config :pleroma, configurable_from_database: false
805
806 config :pleroma, Pleroma.Repo,
807   parameters: [gin_fuzzy_search_limit: "500", jit: "off"],
808   prepare: :unnamed
809
810 config :pleroma, :connections_pool,
811   reclaim_multiplier: 0.1,
812   connection_acquisition_wait: 250,
813   connection_acquisition_retries: 5,
814   max_connections: 250,
815   max_idle_time: 30_000,
816   retry: 0,
817   connect_timeout: 5_000
818
819 config :pleroma, :pools,
820   federation: [
821     size: 50,
822     max_waiting: 10,
823     recv_timeout: 10_000
824   ],
825   media: [
826     size: 50,
827     max_waiting: 20,
828     recv_timeout: 15_000
829   ],
830   upload: [
831     size: 25,
832     max_waiting: 5,
833     recv_timeout: 15_000
834   ],
835   default: [
836     size: 10,
837     max_waiting: 2,
838     recv_timeout: 5_000
839   ]
840
841 config :pleroma, :hackney_pools,
842   federation: [
843     max_connections: 50,
844     timeout: 150_000
845   ],
846   media: [
847     max_connections: 50,
848     timeout: 150_000
849   ],
850   upload: [
851     max_connections: 25,
852     timeout: 300_000
853   ]
854
855 config :pleroma, :majic_pool, size: 2
856
857 private_instance? = :if_instance_is_private
858
859 config :pleroma, :restrict_unauthenticated,
860   timelines: %{local: private_instance?, federated: private_instance?},
861   profiles: %{local: private_instance?, remote: private_instance?},
862   activities: %{local: private_instance?, remote: private_instance?}
863
864 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
865
866 config :pleroma, :mrf,
867   policies: [
868     Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
869     Pleroma.Web.ActivityPub.MRF.TagPolicy,
870     Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
871   ],
872   transparency: true,
873   transparency_exclusions: []
874
875 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
876
877 config :ex_aws, http_client: Pleroma.HTTP.ExAws
878
879 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
880
881 config :pleroma, :instances_favicons, enabled: false
882
883 config :floki, :html_parser, Floki.HTMLParser.FastHtml
884
885 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
886
887 config :pleroma, Pleroma.User.Backup,
888   purge_after_days: 30,
889   limit_days: 7,
890   dir: nil,
891   process_wait_time: 30_000,
892   process_chunk_size: 100
893
894 config :pleroma, ConcurrentLimiter, [
895   {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
896   {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]},
897   {Pleroma.Search, [max_running: 30, max_waiting: 50]}
898 ]
899
900 config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
901
902 config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
903
904 config :pleroma, Pleroma.Search.Meilisearch,
905   url: "http://127.0.0.1:7700/",
906   private_key: nil,
907   initial_indexing_chunk_size: 100_000
908
909 config :pleroma, Pleroma.Application,
910   background_migrators: true,
911   internal_fetch: true,
912   load_custom_modules: true,
913   max_restarts: 3,
914   streamer_registry: true
915
916 config :pleroma, Pleroma.Uploaders.Uploader, timeout: 30_000
917
918 # Import environment specific config. This must remain at the bottom
919 # of this file so it overrides the configuration defined above.
920 import_config "#{Mix.env()}.exs"