summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/benchmark.exs6
-rw-r--r--config/config.exs65
-rw-r--r--config/description.exs36
-rw-r--r--config/dev.exs3
-rw-r--r--config/test.exs40
5 files changed, 116 insertions, 34 deletions
diff --git a/config/benchmark.exs b/config/benchmark.exs
index 870ead150..d30c95946 100644
--- a/config/benchmark.exs
+++ b/config/benchmark.exs
@@ -14,7 +14,7 @@ config :pleroma, Pleroma.Captcha,
method: Pleroma.Captcha.Mock
# Print only warnings and errors during test
-config :logger, level: :warn
+config :logger, level: :warning
config :pleroma, :auth, oauth_consumer_strategies: []
@@ -79,6 +79,10 @@ IO.puts("RUM enabled: #{rum_enabled}")
config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock
+config :pleroma, Pleroma.Application,
+ background_migrators: false,
+ streamer_registry: false
+
if File.exists?("./config/benchmark.secret.exs") do
import_config "benchmark.secret.exs"
else
diff --git a/config/config.exs b/config/config.exs
index f2c137872..b69044a2b 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -114,14 +114,7 @@ config :pleroma, :uri_schemes,
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "localhost"],
http: [
- ip: {127, 0, 0, 1},
- dispatch: [
- {:_,
- [
- {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
- {:_, Plug.Cowboy.Handler, {Pleroma.Web.Endpoint, []}}
- ]}
- ]
+ ip: {127, 0, 0, 1}
],
protocol: "https",
secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
@@ -171,6 +164,7 @@ config :pleroma, :instance,
short_description: "",
background_image: "/images/city.jpg",
instance_thumbnail: "/instance/thumbnail.jpeg",
+ favicon: "/favicon.png",
limit: 5_000,
description_limit: 5_000,
remote_limit: 100_000,
@@ -191,9 +185,6 @@ config :pleroma, :instance,
federating: true,
federation_incoming_replies_max_depth: 100,
federation_reachability_timeout_days: 7,
- federation_publisher_modules: [
- Pleroma.Web.ActivityPub.Publisher
- ],
allow_relay: true,
public: true,
quarantined_instances: [],
@@ -346,6 +337,8 @@ config :pleroma, :manifest,
icons: [
%{
src: "/static/logo.svg",
+ sizes: "144x144",
+ purpose: "any",
type: "image/svg+xml"
}
],
@@ -422,6 +415,10 @@ config :pleroma, :mrf_follow_bot, follower_nickname: nil
config :pleroma, :mrf_inline_quote, template: "<bdi>RT:</bdi> {url}"
+config :pleroma, :mrf_force_mention,
+ mention_parent: true,
+ mention_quoted: true
+
config :pleroma, :rich_media,
enabled: true,
ignore_hosts: [],
@@ -431,7 +428,11 @@ config :pleroma, :rich_media,
Pleroma.Web.RichMedia.Parsers.OEmbed
],
failure_backoff: 60_000,
- ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
+ ttl_setters: [
+ Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl,
+ Pleroma.Web.RichMedia.Parser.TTL.Opengraph
+ ],
+ max_body: 5_000_000
config :pleroma, :media_proxy,
enabled: false,
@@ -578,7 +579,8 @@ config :pleroma, Oban,
attachments_cleanup: 1,
new_users_digest: 1,
mute_expire: 5,
- search_indexing: 10
+ search_indexing: 10,
+ rich_media_expiration: 2
],
plugins: [Oban.Plugins.Pruner],
crontab: [
@@ -648,12 +650,26 @@ 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.PromEx,
+ disabled: false,
+ manual_metrics_start_delay: :no_delay,
+ drop_metrics_groups: [],
+ grafana: [
+ host: System.get_env("GRAFANA_HOST", "http://localhost:3000"),
+ auth_token: System.get_env("GRAFANA_TOKEN"),
+ upload_dashboards_on_start: false,
+ folder_name: "BEAM",
+ annotate_app_lifecycle: true
+ ],
+ metrics_server: [
+ port: 4021,
+ path: "/metrics",
+ protocol: :http,
+ pool_size: 5,
+ cowboy_opts: [],
+ auth_strategy: :none
+ ],
+ datasource: "Prometheus"
config :pleroma, Pleroma.ScheduledActivity,
daily_user_limit: 25,
@@ -788,7 +804,7 @@ config :pleroma, :modules, runtime_dir: "instance/modules"
config :pleroma, configurable_from_database: false
config :pleroma, Pleroma.Repo,
- parameters: [gin_fuzzy_search_limit: "500"],
+ parameters: [gin_fuzzy_search_limit: "500", jit: "off"],
prepare: :unnamed
config :pleroma, :connections_pool,
@@ -890,6 +906,15 @@ config :pleroma, Pleroma.Search.Meilisearch,
private_key: nil,
initial_indexing_chunk_size: 100_000
+config :pleroma, Pleroma.Application,
+ background_migrators: true,
+ internal_fetch: true,
+ load_custom_modules: true,
+ max_restarts: 3,
+ streamer_registry: true
+
+config :pleroma, Pleroma.Uploaders.Uploader, timeout: 30_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"
diff --git a/config/description.exs b/config/description.exs
index 2fed1a152..58d52519b 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -567,6 +567,20 @@ config :pleroma, :config_description, [
]
},
%{
+ key: :status_page,
+ type: :string,
+ description: "A page where people can see the status of the server during an outage",
+ suggestions: [
+ "https://status.pleroma.example.org"
+ ]
+ },
+ %{
+ key: :contact_username,
+ type: :string,
+ description: "Instance owner username",
+ suggestions: ["admin"]
+ },
+ %{
key: :limit,
type: :integer,
description: "Posts character limit (CW/Subject included in the counter)",
@@ -988,6 +1002,12 @@ config :pleroma, :config_description, [
suggestions: ["/instance/thumbnail.jpeg"]
},
%{
+ key: :favicon,
+ type: {:string, :image},
+ description: "Favicon of the instance",
+ suggestions: ["/favicon.png"]
+ },
+ %{
key: :show_reactions,
type: :boolean,
description: "Let favourites and emoji reactions be viewed through the API."
@@ -1181,7 +1201,7 @@ config :pleroma, :config_description, [
type: [:atom, :tuple, :module],
description:
"Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
- suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
+ suggestions: [:console, {ExSyslogger, :ex_syslogger}]
}
]
},
@@ -1196,7 +1216,7 @@ config :pleroma, :config_description, [
key: :level,
type: {:dropdown, :atom},
description: "Log level",
- suggestions: [:debug, :info, :warn, :error]
+ suggestions: [:debug, :info, :warning, :error]
},
%{
key: :ident,
@@ -1229,7 +1249,7 @@ config :pleroma, :config_description, [
key: :level,
type: {:dropdown, :atom},
description: "Log level",
- suggestions: [:debug, :info, :warn, :error]
+ suggestions: [:debug, :info, :warning, :error]
},
%{
key: :format,
@@ -1438,7 +1458,7 @@ config :pleroma, :config_description, [
label: "Subject line behavior",
type: :string,
description: "Allows changing the default behaviour of subject lines in replies.
- `email`: copy and preprend re:, as in email,
+ `email`: copy and prepend re:, as in email,
`masto`: copy verbatim, as in Mastodon,
`noop`: don't copy the subject.",
suggestions: ["email", "masto", "noop"]
@@ -1937,7 +1957,7 @@ config :pleroma, :config_description, [
key: :log,
type: {:dropdown, :atom},
description: "Logs verbose mode",
- suggestions: [false, :error, :warn, :info, :debug]
+ suggestions: [false, :error, :warning, :info, :debug]
},
%{
key: :queues,
@@ -3096,7 +3116,7 @@ config :pleroma, :config_description, [
key: :max_waiting,
type: :integer,
description:
- "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
+ "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errors when a new request is made",
suggestions: [10]
},
%{
@@ -3362,7 +3382,7 @@ config :pleroma, :config_description, [
%{
key: :purge_after_days,
type: :integer,
- description: "Remove backup achives after N days",
+ description: "Remove backup archives after N days",
suggestions: [30]
},
%{
@@ -3508,7 +3528,7 @@ config :pleroma, :config_description, [
},
%{
key: :initial_indexing_chunk_size,
- type: :int,
+ type: :integer,
description:
"Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
" since there's a limit on maximum insert size",
diff --git a/config/dev.exs b/config/dev.exs
index ab3e83c12..fe8de5045 100644
--- a/config/dev.exs
+++ b/config/dev.exs
@@ -8,8 +8,7 @@ import Config
# with brunch.io to recompile .js and .css sources.
config :pleroma, Pleroma.Web.Endpoint,
http: [
- port: 4000,
- protocol_options: [max_request_line_length: 8192, max_header_value_length: 8192]
+ port: 4000
],
protocol: "http",
debug_errors: true,
diff --git a/config/test.exs b/config/test.exs
index 5e8135a58..9b4113dd5 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -16,7 +16,7 @@ config :pleroma, Pleroma.Captcha,
# Print only warnings and errors during test
config :logger, :console,
- level: :warn,
+ level: :warning,
format: "\n[$level] $message\n"
config :pleroma, :auth, oauth_consumer_strategies: []
@@ -49,7 +49,7 @@ config :pleroma, Pleroma.Repo,
hostname: System.get_env("DB_HOST") || "localhost",
port: System.get_env("DB_PORT") || "5432",
pool: Ecto.Adapters.SQL.Sandbox,
- pool_size: 50
+ pool_size: System.schedulers_online() * 2
config :pleroma, :dangerzone, override_repo_pool_size: true
@@ -61,7 +61,8 @@ config :tesla, adapter: Tesla.Mock
config :pleroma, :rich_media,
enabled: false,
ignore_hosts: [],
- ignore_tld: ["local", "localdomain", "lan"]
+ ignore_tld: ["local", "localdomain", "lan"],
+ max_body: 2_000_000
config :pleroma, :instance,
multi_factor_authentication: [
@@ -143,6 +144,39 @@ config :phoenix, :plug_init_mode, :runtime
config :pleroma, :config_impl, Pleroma.UnstubbedConfigMock
+config :pleroma, Pleroma.PromEx, disabled: true
+
+# Mox definitions. Only read during compile time.
+config :pleroma, Pleroma.User.Backup, config_impl: Pleroma.UnstubbedConfigMock
+config :pleroma, Pleroma.Uploaders.S3, ex_aws_impl: Pleroma.Uploaders.S3.ExAwsMock
+config :pleroma, Pleroma.Uploaders.S3, config_impl: Pleroma.UnstubbedConfigMock
+config :pleroma, Pleroma.Upload, config_impl: Pleroma.UnstubbedConfigMock
+config :pleroma, Pleroma.ScheduledActivity, config_impl: Pleroma.UnstubbedConfigMock
+config :pleroma, Pleroma.Web.RichMedia.Helpers, config_impl: Pleroma.StaticStubbedConfigMock
+
+peer_module =
+ if String.to_integer(System.otp_release()) >= 25 do
+ :peer
+ else
+ :slave
+ end
+
+config :pleroma, Pleroma.Cluster, peer_module: peer_module
+
+config :pleroma, Pleroma.Application,
+ background_migrators: false,
+ internal_fetch: false,
+ load_custom_modules: false,
+ max_restarts: 100,
+ streamer_registry: false,
+ test_http_pools: true
+
+config :pleroma, Pleroma.Uploaders.Uploader, timeout: 1_000
+
+config :pleroma, Pleroma.Emoji.Loader, test_emoji: true
+
+config :pleroma, Pleroma.Web.RichMedia.Backfill, provider: Pleroma.Web.RichMedia.Backfill
+
if File.exists?("./config/test.secret.exs") do
import_config "test.secret.exs"
else