Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

858 lines
22KB

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