logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

config.exs (26078B)


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