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.

501 lines
13KB

  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. types: Pleroma.PostgresTypes,
  49. telemetry_event: [Pleroma.Repo.Instrumenter],
  50. migration_lock: nil
  51. config :pleroma, Pleroma.Captcha,
  52. enabled: false,
  53. seconds_valid: 60,
  54. method: Pleroma.Captcha.Kocaptcha
  55. config :pleroma, :hackney_pools,
  56. federation: [
  57. max_connections: 50,
  58. timeout: 150_000
  59. ],
  60. media: [
  61. max_connections: 50,
  62. timeout: 150_000
  63. ],
  64. upload: [
  65. max_connections: 25,
  66. timeout: 300_000
  67. ]
  68. config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
  69. # Upload configuration
  70. config :pleroma, Pleroma.Upload,
  71. uploader: Pleroma.Uploaders.Local,
  72. filters: [Pleroma.Upload.Filter.Dedupe],
  73. link_name: true,
  74. proxy_remote: false,
  75. proxy_opts: [
  76. redirect_on_failure: false,
  77. max_body_length: 25 * 1_048_576,
  78. http: [
  79. follow_redirect: true,
  80. pool: :upload
  81. ]
  82. ]
  83. config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
  84. config :pleroma, Pleroma.Uploaders.S3,
  85. bucket: nil,
  86. public_endpoint: "https://s3.amazonaws.com"
  87. config :pleroma, Pleroma.Uploaders.MDII,
  88. cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
  89. files: "https://mdii.sakura.ne.jp"
  90. config :pleroma, :emoji,
  91. shortcode_globs: ["/emoji/custom/**/*.png"],
  92. groups: [
  93. # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
  94. Custom: ["/emoji/*.png", "/emoji/**/*.png"]
  95. ],
  96. default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"
  97. config :pleroma, :uri_schemes,
  98. valid_schemes: [
  99. "https",
  100. "http",
  101. "dat",
  102. "dweb",
  103. "gopher",
  104. "ipfs",
  105. "ipns",
  106. "irc",
  107. "ircs",
  108. "magnet",
  109. "mailto",
  110. "mumble",
  111. "ssb",
  112. "xmpp"
  113. ]
  114. websocket_config = [
  115. path: "/websocket",
  116. serializer: [
  117. {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
  118. {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
  119. ],
  120. timeout: 60_000,
  121. transport_log: false,
  122. compress: false
  123. ]
  124. # Configures the endpoint
  125. config :pleroma, Pleroma.Web.Endpoint,
  126. instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
  127. url: [host: "localhost"],
  128. http: [
  129. dispatch: [
  130. {:_,
  131. [
  132. {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
  133. {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
  134. {Phoenix.Transports.WebSocket,
  135. {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
  136. {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
  137. ]}
  138. ]
  139. ],
  140. protocol: "https",
  141. secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
  142. signing_salt: "CqaoopA2",
  143. render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
  144. pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  145. secure_cookie_flag: true,
  146. extra_cookie_attrs: [
  147. "SameSite=Lax"
  148. ]
  149. # Configures Elixir's Logger
  150. config :logger, :console,
  151. format: "$time $metadata[$level] $message\n",
  152. metadata: [:request_id]
  153. config :logger, :ex_syslogger,
  154. level: :debug,
  155. ident: "Pleroma",
  156. format: "$metadata[$level] $message",
  157. metadata: [:request_id]
  158. config :quack,
  159. level: :warn,
  160. meta: [:all],
  161. webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
  162. config :mime, :types, %{
  163. "application/xml" => ["xml"],
  164. "application/xrd+xml" => ["xrd+xml"],
  165. "application/jrd+json" => ["jrd+json"],
  166. "application/activity+json" => ["activity+json"],
  167. "application/ld+json" => ["activity+json"]
  168. }
  169. config :tesla, adapter: Tesla.Adapter.Hackney
  170. # Configures http settings, upstream proxy etc.
  171. config :pleroma, :http,
  172. proxy_url: nil,
  173. send_user_agent: true,
  174. adapter: [
  175. ssl_options: [
  176. # We don't support TLS v1.3 yet
  177. versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
  178. ]
  179. ]
  180. config :pleroma, :instance,
  181. name: "Pleroma",
  182. email: "example@example.com",
  183. notify_email: "noreply@example.com",
  184. description: "A Pleroma instance, an alternative fediverse server",
  185. limit: 5_000,
  186. remote_limit: 100_000,
  187. upload_limit: 16_000_000,
  188. avatar_upload_limit: 2_000_000,
  189. background_upload_limit: 4_000_000,
  190. banner_upload_limit: 4_000_000,
  191. poll_limits: %{
  192. max_options: 20,
  193. max_option_chars: 200,
  194. min_expiration: 0,
  195. max_expiration: 365 * 24 * 60 * 60
  196. },
  197. registrations_open: true,
  198. federating: true,
  199. federation_reachability_timeout_days: 7,
  200. federation_publisher_modules: [
  201. Pleroma.Web.ActivityPub.Publisher,
  202. Pleroma.Web.Websub,
  203. Pleroma.Web.Salmon
  204. ],
  205. allow_relay: true,
  206. rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
  207. public: true,
  208. quarantined_instances: [],
  209. managed_config: true,
  210. static_dir: "instance/static/",
  211. allowed_post_formats: [
  212. "text/plain",
  213. "text/html",
  214. "text/markdown",
  215. "text/bbcode"
  216. ],
  217. mrf_transparency: true,
  218. autofollowed_nicknames: [],
  219. max_pinned_statuses: 1,
  220. no_attachment_links: false,
  221. welcome_user_nickname: nil,
  222. welcome_message: nil,
  223. max_report_comment_size: 1000,
  224. safe_dm_mentions: false,
  225. healthcheck: false,
  226. remote_post_retention_days: 90
  227. config :pleroma, :app_account_creation, enabled: true, max_requests: 25, interval: 1800
  228. config :pleroma, :markup,
  229. # XXX - unfortunately, inline images must be enabled by default right now, because
  230. # of custom emoji. Issue #275 discusses defanging that somehow.
  231. allow_inline_images: true,
  232. allow_headings: false,
  233. allow_tables: false,
  234. allow_fonts: false,
  235. scrub_policy: [
  236. Pleroma.HTML.Transform.MediaProxy,
  237. Pleroma.HTML.Scrubber.Default
  238. ]
  239. config :pleroma, :frontend_configurations,
  240. pleroma_fe: %{
  241. theme: "pleroma-dark",
  242. logo: "/static/logo.png",
  243. background: "/images/city.jpg",
  244. redirectRootNoLogin: "/main/all",
  245. redirectRootLogin: "/main/friends",
  246. showInstanceSpecificPanel: true,
  247. scopeOptionsEnabled: false,
  248. formattingOptionsEnabled: false,
  249. collapseMessageWithSubject: false,
  250. hidePostStats: false,
  251. hideUserStats: false,
  252. scopeCopy: true,
  253. subjectLineBehavior: "email",
  254. alwaysShowSubjectInput: true
  255. },
  256. masto_fe: %{
  257. showInstanceSpecificPanel: true
  258. }
  259. config :pleroma, :assets,
  260. mascots: [
  261. pleroma_fox_tan: %{
  262. url: "/images/pleroma-fox-tan-smol.png",
  263. mime_type: "image/png"
  264. },
  265. pleroma_fox_tan_shy: %{
  266. url: "/images/pleroma-fox-tan-shy.png",
  267. mime_type: "image/png"
  268. }
  269. ],
  270. default_mascot: :pleroma_fox_tan
  271. config :pleroma, :activitypub,
  272. accept_blocks: true,
  273. unfollow_blocked: true,
  274. outgoing_blocks: true,
  275. follow_handshake_timeout: 500
  276. config :pleroma, :user, deny_follow_blocked: true
  277. config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
  278. config :pleroma, :mrf_rejectnonpublic,
  279. allow_followersonly: false,
  280. allow_direct: false
  281. config :pleroma, :mrf_hellthread,
  282. delist_threshold: 10,
  283. reject_threshold: 20
  284. config :pleroma, :mrf_simple,
  285. media_removal: [],
  286. media_nsfw: [],
  287. federated_timeline_removal: [],
  288. report_removal: [],
  289. reject: [],
  290. accept: [],
  291. avatar_removal: [],
  292. banner_removal: []
  293. config :pleroma, :mrf_keyword,
  294. reject: [],
  295. federated_timeline_removal: [],
  296. replace: []
  297. config :pleroma, :rich_media, enabled: true
  298. config :pleroma, :media_proxy,
  299. enabled: false,
  300. proxy_opts: [
  301. redirect_on_failure: false,
  302. max_body_length: 25 * 1_048_576,
  303. http: [
  304. follow_redirect: true,
  305. pool: :media
  306. ]
  307. ],
  308. whitelist: []
  309. config :pleroma, :chat, enabled: true
  310. config :phoenix, :format_encoders, json: Jason
  311. config :pleroma, :gopher,
  312. enabled: false,
  313. ip: {0, 0, 0, 0},
  314. port: 9999
  315. config :pleroma, Pleroma.Web.Metadata,
  316. providers: [Pleroma.Web.Metadata.Providers.RelMe],
  317. unfurl_nsfw: false
  318. config :pleroma, :suggestions,
  319. enabled: false,
  320. third_party_engine:
  321. "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
  322. timeout: 300_000,
  323. limit: 23,
  324. web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
  325. config :pleroma, :http_security,
  326. enabled: true,
  327. sts: false,
  328. sts_max_age: 31_536_000,
  329. ct_max_age: 2_592_000,
  330. referrer_policy: "same-origin"
  331. config :cors_plug,
  332. max_age: 86_400,
  333. methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  334. expose: [
  335. "Link",
  336. "X-RateLimit-Reset",
  337. "X-RateLimit-Limit",
  338. "X-RateLimit-Remaining",
  339. "X-Request-Id",
  340. "Idempotency-Key"
  341. ],
  342. credentials: true,
  343. headers: ["Authorization", "Content-Type", "Idempotency-Key"]
  344. config :pleroma, Pleroma.User,
  345. restricted_nicknames: [
  346. ".well-known",
  347. "~",
  348. "about",
  349. "activities",
  350. "api",
  351. "auth",
  352. "check_password",
  353. "dev",
  354. "friend-requests",
  355. "inbox",
  356. "internal",
  357. "main",
  358. "media",
  359. "nodeinfo",
  360. "notice",
  361. "oauth",
  362. "objects",
  363. "ostatus_subscribe",
  364. "pleroma",
  365. "proxy",
  366. "push",
  367. "registration",
  368. "relay",
  369. "settings",
  370. "status",
  371. "tag",
  372. "user-search",
  373. "user_exists",
  374. "users",
  375. "web"
  376. ]
  377. config :pleroma, Pleroma.Web.Federator.RetryQueue,
  378. enabled: false,
  379. max_jobs: 20,
  380. initial_timeout: 30,
  381. max_retries: 5
  382. config :pleroma_job_queue, :queues,
  383. federator_incoming: 50,
  384. federator_outgoing: 50,
  385. web_push: 50,
  386. mailer: 10,
  387. transmogrifier: 20,
  388. scheduled_activities: 10,
  389. background: 5
  390. config :pleroma, :fetch_initial_posts,
  391. enabled: false,
  392. pages: 5
  393. config :auto_linker,
  394. opts: [
  395. scheme: true,
  396. extra: true,
  397. class: false,
  398. strip_prefix: false,
  399. new_window: false,
  400. rel: false
  401. ]
  402. config :pleroma, :ldap,
  403. enabled: System.get_env("LDAP_ENABLED") == "true",
  404. host: System.get_env("LDAP_HOST") || "localhost",
  405. port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
  406. ssl: System.get_env("LDAP_SSL") == "true",
  407. sslopts: [],
  408. tls: System.get_env("LDAP_TLS") == "true",
  409. tlsopts: [],
  410. base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
  411. uid: System.get_env("LDAP_UID") || "cn"
  412. config :esshd,
  413. enabled: false
  414. oauth_consumer_strategies = String.split(System.get_env("OAUTH_CONSUMER_STRATEGIES") || "")
  415. ueberauth_providers =
  416. for strategy <- oauth_consumer_strategies do
  417. strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
  418. strategy_module = String.to_atom(strategy_module_name)
  419. {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
  420. end
  421. config :ueberauth,
  422. Ueberauth,
  423. base_path: "/oauth",
  424. providers: ueberauth_providers
  425. config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
  426. config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail
  427. config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
  428. config :pleroma, Pleroma.ScheduledActivity,
  429. daily_user_limit: 25,
  430. total_user_limit: 300,
  431. enabled: true
  432. config :pleroma, :oauth2,
  433. token_expires_in: 600,
  434. issue_new_refresh_token: true,
  435. clean_expired_tokens: false,
  436. clean_expired_tokens_interval: 86_400_000
  437. config :pleroma, :database, rum_enabled: false
  438. config :http_signatures,
  439. adapter: Pleroma.Signature
  440. # Import environment specific config. This must remain at the bottom
  441. # of this file so it overrides the configuration defined above.
  442. import_config "#{Mix.env()}.exs"