Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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