logo

pleroma

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

config.exs (25753B)


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