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.

182 lines
4.7KB

  1. # This file is responsible for configuring your application
  2. # and its dependencies with the aid of the Mix.Config module.
  3. #
  4. # This configuration file is loaded before any dependency and
  5. # is restricted to this project.
  6. use Mix.Config
  7. # General application configuration
  8. config :pleroma, ecto_repos: [Pleroma.Repo]
  9. config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
  10. config :pleroma, Pleroma.Upload,
  11. uploader: Pleroma.Uploaders.Local,
  12. strip_exif: false
  13. config :pleroma, Pleroma.Uploaders.Local,
  14. uploads: "uploads",
  15. uploads_url: "{{base_url}}/media/{{file}}"
  16. config :pleroma, Pleroma.Uploaders.S3,
  17. bucket: nil,
  18. public_endpoint: "https://s3.amazonaws.com",
  19. force_media_proxy: false
  20. config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
  21. config :pleroma, :uri_schemes,
  22. valid_schemes: [
  23. "https",
  24. "http",
  25. "dat",
  26. "dweb",
  27. "gopher",
  28. "ipfs",
  29. "ipns",
  30. "irc",
  31. "ircs",
  32. "magnet",
  33. "mailto",
  34. "mumble",
  35. "ssb",
  36. "xmpp"
  37. ]
  38. # Configures the endpoint
  39. config :pleroma, Pleroma.Web.Endpoint,
  40. url: [host: "localhost"],
  41. protocol: "https",
  42. secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
  43. render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
  44. pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
  45. secure_cookie_flag: true
  46. # Configures Elixir's Logger
  47. config :logger, :console,
  48. format: "$time $metadata[$level] $message\n",
  49. metadata: [:request_id]
  50. config :mime, :types, %{
  51. "application/xml" => ["xml"],
  52. "application/xrd+xml" => ["xrd+xml"],
  53. "application/activity+json" => ["activity+json"],
  54. "application/ld+json" => ["activity+json"]
  55. }
  56. config :pleroma, :websub, Pleroma.Web.Websub
  57. config :pleroma, :ostatus, Pleroma.Web.OStatus
  58. config :pleroma, :httpoison, Pleroma.HTTP
  59. version =
  60. with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
  61. "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
  62. else
  63. _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
  64. end
  65. # Configures http settings, upstream proxy etc.
  66. config :pleroma, :http, proxy_url: nil
  67. config :pleroma, :instance,
  68. version: version,
  69. name: "Pleroma",
  70. email: "example@example.com",
  71. description: "A Pleroma instance, an alternative fediverse server",
  72. limit: 5000,
  73. upload_limit: 16_000_000,
  74. avatar_upload_limit: 2_000_000,
  75. background_upload_limit: 4_000_000,
  76. banner_upload_limit: 4_000_000,
  77. registrations_open: true,
  78. federating: true,
  79. allow_relay: true,
  80. rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
  81. public: true,
  82. quarantined_instances: [],
  83. managed_config: true,
  84. allowed_post_formats: [
  85. "text/plain",
  86. "text/html",
  87. "text/markdown"
  88. ],
  89. finmoji_enabled: true,
  90. mrf_transparency: true
  91. config :pleroma, :markup,
  92. # XXX - unfortunately, inline images must be enabled by default right now, because
  93. # of custom emoji. Issue #275 discusses defanging that somehow.
  94. allow_inline_images: true,
  95. allow_headings: false,
  96. allow_tables: false,
  97. allow_fonts: false,
  98. scrub_policy: [
  99. Pleroma.HTML.Transform.MediaProxy,
  100. Pleroma.HTML.Scrubber.Default
  101. ]
  102. config :pleroma, :fe,
  103. theme: "pleroma-dark",
  104. logo: "/static/logo.png",
  105. logo_mask: true,
  106. logo_margin: "0.1em",
  107. background: "/static/aurora_borealis.jpg",
  108. redirect_root_no_login: "/main/all",
  109. redirect_root_login: "/main/friends",
  110. show_instance_panel: true,
  111. scope_options_enabled: false,
  112. formatting_options_enabled: false,
  113. collapse_message_with_subject: false,
  114. hide_post_stats: false,
  115. hide_user_stats: false
  116. config :pleroma, :activitypub,
  117. accept_blocks: true,
  118. unfollow_blocked: true,
  119. outgoing_blocks: true,
  120. follow_handshake_timeout: 500
  121. config :pleroma, :user, deny_follow_blocked: true
  122. config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
  123. config :pleroma, :mrf_rejectnonpublic,
  124. allow_followersonly: false,
  125. allow_direct: false
  126. config :pleroma, :mrf_simple,
  127. media_removal: [],
  128. media_nsfw: [],
  129. federated_timeline_removal: [],
  130. reject: [],
  131. accept: []
  132. config :pleroma, :media_proxy,
  133. enabled: false,
  134. redirect_on_failure: true
  135. # base_url: "https://cache.pleroma.social"
  136. config :pleroma, :chat, enabled: true
  137. config :ecto, json_library: Jason
  138. config :phoenix, :format_encoders, json: Jason
  139. config :pleroma, :gopher,
  140. enabled: false,
  141. ip: {0, 0, 0, 0},
  142. port: 9999
  143. config :pleroma, :suggestions,
  144. enabled: false,
  145. third_party_engine:
  146. "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
  147. timeout: 300_000,
  148. limit: 23,
  149. web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
  150. # Import environment specific config. This must remain at the bottom
  151. # of this file so it overrides the configuration defined above.
  152. import_config "#{Mix.env()}.exs"