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.

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