X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=config%2Fconfig.exs;h=a0176a72df9e60700d2ddb5cc28bd6fa1ff0e650;hb=9c7178286116d61a565fcba61ec64b20fec3a28a;hp=cecbea9b3f306a5e1e3dbbbe551f32a65c946479;hpb=4d2149a124001ab150489897810c21678d22aae2;p=akkoma diff --git a/config/config.exs b/config/config.exs index cecbea9b3..a0176a72d 100644 --- a/config/config.exs +++ b/config/config.exs @@ -48,6 +48,7 @@ config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, telemetry_event: [Pleroma.Repo.Instrumenter], + queue_target: 20_000, migration_lock: nil config :pleroma, Pleroma.Captcha, @@ -162,11 +163,6 @@ config :logger, :ex_syslogger, format: "$metadata[$level] $message", metadata: [:request_id] -config :quack, - level: :warn, - meta: [:all], - webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE" - config :mime, :types, %{ "application/xml" => ["xml"], "application/xrd+xml" => ["xrd+xml"], @@ -175,17 +171,18 @@ 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, + pool_timeout: :timer.seconds(5), + receive_timeout: :timer.seconds(15), proxy_url: nil, - send_user_agent: true, user_agent: :default, adapter: [] config :pleroma, :instance, - name: "Pleroma", + name: "Akkoma", email: "example@example.com", notify_email: "noreply@example.com", description: "Akkoma: The cooler fediverse server", @@ -198,6 +195,7 @@ config :pleroma, :instance, avatar_upload_limit: 2_000_000, background_upload_limit: 4_000_000, banner_upload_limit: 4_000_000, + languages: ["en"], poll_limits: %{ max_options: 20, max_option_chars: 200, @@ -214,9 +212,8 @@ config :pleroma, :instance, federation_publisher_modules: [ Pleroma.Web.ActivityPub.Publisher ], - allow_relay: true, + allow_relay: false, public: true, - quarantined_instances: [], static_dir: "instance/static/", allowed_post_formats: [ "text/plain", @@ -260,7 +257,9 @@ config :pleroma, :instance, show_reactions: true, password_reset_token_validity: 60 * 60 * 24, profile_directory: true, - privileged_staff: false + privileged_staff: false, + local_bubble: [], + max_frontend_settings_json_chars: 100_000 config :pleroma, :welcome, direct_message: [ @@ -268,11 +267,6 @@ config :pleroma, :welcome, sender_nickname: nil, message: nil ], - chat_message: [ - enabled: false, - sender_nickname: nil, - message: nil - ], email: [ enabled: false, sender: nil, @@ -315,19 +309,19 @@ config :pleroma, :frontend_configurations, logo: "/static/logo.svg", logoMargin: ".1em", logoMask: true, - minimalScopesMode: false, noAttachmentLinks: false, nsfwCensorImage: "", postContentType: "text/plain", redirectRootLogin: "/main/friends", - redirectRootNoLogin: "/main/all", + redirectRootNoLogin: "/main/public", scopeCopy: true, sidebarRight: false, showFeaturesPanel: true, showInstanceSpecificPanel: false, subjectLineBehavior: "email", theme: "pleroma-dark", - webPushNotifications: false + webPushNotifications: false, + conversationDisplay: "linear" }, masto_fe: %{ showInstanceSpecificPanel: true @@ -363,7 +357,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, @@ -391,7 +386,8 @@ config :pleroma, :mrf_simple, accept: [], avatar_removal: [], banner_removal: [], - reject_deletes: [] + reject_deletes: [], + handle_threads: true config :pleroma, :mrf_keyword, reject: [], @@ -411,6 +407,8 @@ config :pleroma, :mrf_vocabulary, accept: [], reject: [] +config :pleroma, :mrf_inline_quote, prefix: "RE" + # threshold of 7 days config :pleroma, :mrf_object_age, threshold: 604_800, @@ -439,11 +437,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: [] @@ -481,6 +475,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 @@ -489,8 +485,7 @@ config :pleroma, Pleroma.Web.Preload, config :pleroma, :http_security, enabled: true, sts: false, - sts_max_age: 31_536_000, - ct_max_age: 2_592_000, + sts_max_age: 63_072_000, referrer_policy: "same-origin" config :cors_plug, @@ -568,18 +563,48 @@ config :pleroma, Oban, remote_fetcher: 2, attachments_cleanup: 1, new_users_digest: 1, - mute_expire: 5 + mute_expire: 5, + search_indexing: 10, + nodeinfo_fetcher: 1, + database_prune: 1 + ], + plugins: [ + Oban.Plugins.Pruner, + {Oban.Plugins.Reindexer, schedule: "@weekly"} ], - plugins: [Oban.Plugins.Pruner], crontab: [ {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker}, - {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker} + {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}, + {"0 3 * * *", Pleroma.Workers.Cron.PruneDatabaseWorker} ] config :pleroma, :workers, retries: [ federator_incoming: 5, - federator_outgoing: 5 + federator_outgoing: 5, + search_indexing: 2 + ], + timeout: [ + activity_expiration: :timer.seconds(5), + token_expiration: :timer.seconds(5), + filter_expiration: :timer.seconds(5), + backup: :timer.seconds(900), + federator_incoming: :timer.seconds(10), + federator_outgoing: :timer.seconds(10), + ingestion_queue: :timer.seconds(5), + web_push: :timer.seconds(5), + mailer: :timer.seconds(5), + transmogrifier: :timer.seconds(5), + scheduled_activities: :timer.seconds(5), + poll_notifications: :timer.seconds(5), + background: :timer.seconds(5), + remote_fetcher: :timer.seconds(10), + attachments_cleanup: :timer.seconds(900), + new_users_digest: :timer.seconds(10), + mute_expire: :timer.seconds(5), + search_indexing: :timer.seconds(5), + nodeinfo_fetcher: :timer.seconds(10), + database_prune: :timer.minutes(10) ] config :pleroma, Pleroma.Formatter, @@ -625,6 +650,10 @@ config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false +config :swoosh, + api_client: Swoosh.ApiClient.Finch, + finch_name: MyFinch + config :pleroma, Pleroma.Emails.UserEmail, logo: nil, styling: %{ @@ -638,13 +667,6 @@ config :pleroma, Pleroma.Emails.UserEmail, config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false -config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, - enabled: false, - auth: false, - ip_whitelist: [], - path: "/api/pleroma/app_metrics", - format: :text - config :pleroma, Pleroma.ScheduledActivity, daily_user_limit: 25, total_user_limit: 300, @@ -718,35 +740,62 @@ config :pleroma, :static_fe, enabled: false # available: %{...} config :pleroma, :frontends, + primary: %{"name" => "pleroma-fe", "ref" => "stable"}, + admin: %{"name" => "admin-fe", "ref" => "stable"}, + mastodon: %{"name" => "mastodon-fe", "ref" => "akkoma"}, + swagger: %{ + "name" => "swagger-ui", + "ref" => "stable", + "enabled" => false + }, available: %{ "pleroma-fe" => %{ "name" => "pleroma-fe", "git" => "https://akkoma.dev/AkkomaGang/pleroma-fe", - "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/akkoma-fe.zip", - "ref" => "develop", + "build_url" => + "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/akkoma-fe.zip", + "ref" => "stable", "build_dir" => "dist" }, - # mastodon-Fe cannot be set as a primary - this is only here so we can update this seperately + # 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_url" => + "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/masto-fe.zip", + "build_dir" => "distribution", + "ref" => "akkoma" + }, + "fedibird-fe" => %{ + "name" => "fedibird-fe", + "git" => "https://akkoma.dev/AkkomaGang/fedibird-fe", + "build_url" => + "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/fedibird-fe.zip", "build_dir" => "distribution", - "ref" => "develop" + "ref" => "akkoma" }, "admin-fe" => %{ "name" => "admin-fe", "git" => "https://akkoma.dev/AkkomaGang/admin-fe", - "build_url" => "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/admin-fe.zip", - "ref" => "develop" + "build_url" => + "https://akkoma-updates.s3-website.fr-par.scw.cloud/frontend/${ref}/admin-fe.zip", + "ref" => "stable" }, "soapbox-fe" => %{ "name" => "soapbox-fe", - "git" => "https://gitlab.com/soapbox-pub/soapbox-fe", + "git" => "https://gitlab.com/soapbox-pub/soapbox", "build_url" => - "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production", - "ref" => "v1.0.0", + "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production", + "ref" => "v2.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" } } @@ -762,51 +811,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 @@ -821,15 +825,15 @@ config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false config :pleroma, :mrf, policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy], transparency: true, - transparency_exclusions: [] - -config :tzdata, :http_client, Pleroma.HTTP.Tzdata + transparency_exclusions: [], + transparency_obfuscate_domains: [] config :ex_aws, http_client: Pleroma.HTTP.ExAws config :web_push_encryption, http_client: Pleroma.HTTP.WebPush -config :pleroma, :instances_favicons, enabled: false +config :pleroma, :instances_favicons, enabled: true +config :pleroma, :instances_nodeinfo, enabled: true config :floki, :html_parser, Floki.HTMLParser.FastHtml @@ -842,17 +846,47 @@ 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, :search, provider: Pleroma.Search.Builtin +config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true + +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 + } + } -config :pleroma, :telemetry, - slow_queries_logging: [ - enabled: false, - min_duration: 500_000, - exclude_sources: [nil, "oban_jobs"] - ] +config :pleroma, :translator, + enabled: false, + module: Pleroma.Akkoma.Translators.DeepL + +config :pleroma, :deepl, + # either :free or :pro + tier: :free, + api_key: "" + +config :pleroma, :libre_translate, + url: "http://127.0.0.1:5000", + api_key: nil # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above.