Documentation updates for stable release (#73)
[akkoma] / config / config.exs
index 681b498275d90bdc80ebb5bd28b6100075136a54..9186b011d40f146ca43e56195539c6cd46db0710 100644 (file)
@@ -139,6 +139,7 @@ config :pleroma, Pleroma.Web.Endpoint,
   ],
   protocol: "https",
   secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
+  live_view: [signing_salt: "U5ELgdEwTD3n1+D5s0rY0AMg8/y1STxZ3Zvsl3bWh+oBcGrYdil0rXqPMRd3Glcq"],
   signing_salt: "CqaoopA2",
   render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
   pubsub_server: Pleroma.PubSub,
@@ -148,13 +149,15 @@ config :pleroma, Pleroma.Web.Endpoint,
   ]
 
 # Configures Elixir's Logger
+config :logger, truncate: 65_536
+
 config :logger, :console,
-  level: :debug,
+  level: :info,
   format: "\n$time $metadata[$level] $message\n",
   metadata: [:request_id]
 
 config :logger, :ex_syslogger,
-  level: :debug,
+  level: :info,
   ident: "pleroma",
   format: "$metadata[$level] $message",
   metadata: [:request_id]
@@ -172,12 +175,11 @@ config :mime, :types, %{
   "application/ld+json" => ["activity+json"]
 }
 
-config :tesla, adapter: Tesla.Adapter.Hackney
+config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
 
 # Configures http settings, upstream proxy etc.
 config :pleroma, :http,
   proxy_url: nil,
-  send_user_agent: true,
   user_agent: :default,
   adapter: []
 
@@ -185,7 +187,7 @@ config :pleroma, :instance,
   name: "Pleroma",
   email: "example@example.com",
   notify_email: "noreply@example.com",
-  description: "Pleroma: An efficient and flexible fediverse server",
+  description: "Akkoma: The cooler fediverse server",
   background_image: "/images/city.jpg",
   instance_thumbnail: "/instance/thumbnail.jpeg",
   limit: 5_000,
@@ -219,8 +221,10 @@ config :pleroma, :instance,
     "text/plain",
     "text/html",
     "text/markdown",
-    "text/bbcode"
+    "text/bbcode",
+    "text/x.misskeymarkdown"
   ],
+  staff_transparency: [],
   autofollowed_nicknames: [],
   autofollowing_nicknames: [],
   max_pinned_statuses: 1,
@@ -253,7 +257,9 @@ config :pleroma, :instance,
     ]
   ],
   show_reactions: true,
-  password_reset_token_validity: 60 * 60 * 24
+  password_reset_token_validity: 60 * 60 * 24,
+  profile_directory: true,
+  privileged_staff: false
 
 config :pleroma, :welcome,
   direct_message: [
@@ -321,6 +327,9 @@ config :pleroma, :frontend_configurations,
     subjectLineBehavior: "email",
     theme: "pleroma-dark",
     webPushNotifications: false
+  },
+  masto_fe: %{
+    showInstanceSpecificPanel: true
   }
 
 config :pleroma, :assets,
@@ -353,7 +362,8 @@ config :pleroma, :activitypub,
   follow_handshake_timeout: 500,
   note_replies_output_limit: 5,
   sign_object_fetches: true,
-  authorized_fetch_mode: false
+  authorized_fetch_mode: false,
+  max_collection_objects: 50
 
 config :pleroma, :streamer,
   workers: 3,
@@ -429,11 +439,7 @@ config :pleroma, :media_proxy,
     redirect_on_failure: false,
     max_body_length: 25 * 1_048_576,
     # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
-    max_read_duration: 30_000,
-    http: [
-      follow_redirect: true,
-      pool: :media
-    ]
+    max_read_duration: 30_000
   ],
   whitelist: []
 
@@ -464,11 +470,6 @@ config :phoenix, :json_library, Jason
 
 config :phoenix, :filter_parameters, ["password", "confirm"]
 
-config :pleroma, :gopher,
-  enabled: false,
-  ip: {0, 0, 0, 0},
-  port: 9999
-
 config :pleroma, Pleroma.Web.Metadata,
   providers: [
     Pleroma.Web.Metadata.Providers.OpenGraph,
@@ -476,6 +477,8 @@ config :pleroma, Pleroma.Web.Metadata,
   ],
   unfurl_nsfw: false
 
+config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196"
+
 config :pleroma, Pleroma.Web.Preload,
   providers: [
     Pleroma.Web.Preload.Providers.Instance
@@ -563,7 +566,8 @@ config :pleroma, Oban,
     remote_fetcher: 2,
     attachments_cleanup: 1,
     new_users_digest: 1,
-    mute_expire: 5
+    mute_expire: 5,
+    search_indexing: 10
   ],
   plugins: [Oban.Plugins.Pruner],
   crontab: [
@@ -574,7 +578,8 @@ config :pleroma, Oban,
 config :pleroma, :workers,
   retries: [
     federator_incoming: 5,
-    federator_outgoing: 5
+    federator_outgoing: 5,
+    search_indexing: 2
   ]
 
 config :pleroma, Pleroma.Formatter,
@@ -597,11 +602,9 @@ config :pleroma, :ldap,
   base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
   uid: System.get_env("LDAP_UID") || "cn"
 
-config :esshd,
-  enabled: false
-
 oauth_consumer_strategies =
-  System.get_env("OAUTH_CONSUMER_STRATEGIES")
+  "OAUTH_CONSUMER_STRATEGIES"
+  |> System.get_env()
   |> to_string()
   |> String.split()
   |> Enum.map(&hd(String.split(&1, ":")))
@@ -711,40 +714,40 @@ config :pleroma, :static_fe, enabled: false
 # config :pleroma, :frontends,
 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
 # admin: %{"name" => "admin-fe", "ref" => "stable"},
+# mastodon: %{"enabled" => true, "name" => "mastodon-fe", "ref" => "develop"}
 # available: %{...}
 
 config :pleroma, :frontends,
+  primary: %{"name" => "pleroma-fe", "ref" => "stable"},
+  admin: %{"name" => "admin-fe", "ref" => "stable"},
+  swagger: %{
+    "name" => "swagger-ui",
+    "ref" => "stable",
+    "enabled" => false
+  },
   available: %{
-    "kenoma" => %{
-      "name" => "kenoma",
-      "git" => "https://git.pleroma.social/lambadalambda/kenoma",
-      "build_url" =>
-        "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
-      "ref" => "master"
-    },
     "pleroma-fe" => %{
       "name" => "pleroma-fe",
-      "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
+      "git" => "https://akkoma.dev/AkkomaGang/pleroma-fe",
       "build_url" =>
-        "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
-      "ref" => "develop"
+        "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/akkoma-fe.zip",
+      "ref" => "stable",
+      "build_dir" => "dist"
     },
-    "fedi-fe" => %{
-      "name" => "fedi-fe",
-      "git" => "https://git.pleroma.social/pleroma/fedi-fe",
-      "build_url" =>
-        "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
-      "ref" => "master",
-      "custom-http-headers" => [
-        {"service-worker-allowed", "/"}
-      ]
+    # Mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately
+    "mastodon-fe" => %{
+      "name" => "mastodon-fe",
+      "git" => "https://akkoma.dev/AkkomaGang/masto-fe",
+      "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/masto-fe.zip",
+      "build_dir" => "distribution",
+      "ref" => "develop"
     },
     "admin-fe" => %{
       "name" => "admin-fe",
-      "git" => "https://git.pleroma.social/pleroma/admin-fe",
+      "git" => "https://akkoma.dev/AkkomaGang/admin-fe",
       "build_url" =>
-        "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
-      "ref" => "develop"
+        "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/admin-fe.zip",
+      "ref" => "stable"
     },
     "soapbox-fe" => %{
       "name" => "soapbox-fe",
@@ -753,6 +756,14 @@ config :pleroma, :frontends,
         "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
       "ref" => "v1.0.0",
       "build_dir" => "static"
+    },
+    # For developers - enables a swagger frontend to view the openapi spec
+    "swagger-ui" => %{
+      "name" => "swagger-ui",
+      "git" => "https://github.com/swagger-api/swagger-ui",
+      "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/swagger-ui.zip",
+      "build_dir" => "dist",
+      "ref" => "stable"
     }
   }
 
@@ -768,51 +779,6 @@ config :pleroma, Pleroma.Repo,
   parameters: [gin_fuzzy_search_limit: "500"],
   prepare: :unnamed
 
-config :pleroma, :connections_pool,
-  reclaim_multiplier: 0.1,
-  connection_acquisition_wait: 250,
-  connection_acquisition_retries: 5,
-  max_connections: 250,
-  max_idle_time: 30_000,
-  retry: 0,
-  connect_timeout: 5_000
-
-config :pleroma, :pools,
-  federation: [
-    size: 50,
-    max_waiting: 10,
-    recv_timeout: 10_000
-  ],
-  media: [
-    size: 50,
-    max_waiting: 20,
-    recv_timeout: 15_000
-  ],
-  upload: [
-    size: 25,
-    max_waiting: 5,
-    recv_timeout: 15_000
-  ],
-  default: [
-    size: 10,
-    max_waiting: 2,
-    recv_timeout: 5_000
-  ]
-
-config :pleroma, :hackney_pools,
-  federation: [
-    max_connections: 50,
-    timeout: 150_000
-  ],
-  media: [
-    max_connections: 50,
-    timeout: 150_000
-  ],
-  upload: [
-    max_connections: 25,
-    timeout: 300_000
-  ]
-
 config :pleroma, :majic_pool, size: 2
 
 private_instance? = :if_instance_is_private
@@ -829,8 +795,6 @@ config :pleroma, :mrf,
   transparency: true,
   transparency_exclusions: []
 
-config :tzdata, :http_client, Pleroma.HTTP.Tzdata
-
 config :ex_aws, http_client: Pleroma.HTTP.ExAws
 
 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
@@ -848,9 +812,33 @@ config :pleroma, Pleroma.User.Backup,
 
 config :pleroma, ConcurrentLimiter, [
   {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
-  {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
+  {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]},
+  {Pleroma.Search, [max_running: 30, max_waiting: 50]}
 ]
 
+config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
+
+config :pleroma, Pleroma.Search.Meilisearch,
+  url: "http://127.0.0.1:7700/",
+  private_key: nil,
+  initial_indexing_chunk_size: 100_000
+
+config :pleroma, Pleroma.Search.Elasticsearch.Cluster,
+  url: "http://localhost:9200",
+  username: "elastic",
+  password: "changeme",
+  api: Elasticsearch.API.HTTP,
+  json_library: Jason,
+  indexes: %{
+    activities: %{
+      settings: "priv/es-mappings/activity.json",
+      store: Pleroma.Search.Elasticsearch.Store,
+      sources: [Pleroma.Activity],
+      bulk_page_size: 1000,
+      bulk_wait_interval: 15_000
+    }
+  }
+
 # Import environment specific config. This must remain at the bottom
 # of this file so it overrides the configuration defined above.
 import_config "#{Mix.env()}.exs"