Merge remote-tracking branch 'origin/develop' into shigusegubu
This commit is contained in:
commit
d65bdde809
563 changed files with 7223 additions and 2667 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -110,32 +110,11 @@ config :pleroma, :uri_schemes,
|
|||
"xmpp"
|
||||
]
|
||||
|
||||
websocket_config = [
|
||||
path: "/websocket",
|
||||
serializer: [
|
||||
{Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
|
||||
{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
|
||||
],
|
||||
timeout: 60_000,
|
||||
transport_log: false,
|
||||
compress: false
|
||||
]
|
||||
|
||||
# Configures the endpoint
|
||||
config :pleroma, Pleroma.Web.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
http: [
|
||||
ip: {127, 0, 0, 1},
|
||||
dispatch: [
|
||||
{:_,
|
||||
[
|
||||
{"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
|
||||
{"/websocket", Phoenix.Endpoint.CowboyWebSocket,
|
||||
{Phoenix.Transports.WebSocket,
|
||||
{Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
|
||||
{:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
|
||||
]}
|
||||
]
|
||||
ip: {127, 0, 0, 1}
|
||||
],
|
||||
protocol: "https",
|
||||
secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
|
||||
|
|
@ -206,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: [{ "pleroma.rareome.ga", "leaks private posts or sumshit i dont rember" }],
|
||||
|
|
@ -452,6 +428,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: [],
|
||||
|
|
@ -607,7 +587,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: [
|
||||
|
|
@ -618,7 +599,8 @@ config :pleroma, Oban,
|
|||
config :pleroma, :workers,
|
||||
retries: [
|
||||
federator_incoming: 5,
|
||||
federator_outgoing: 5
|
||||
federator_outgoing: 5,
|
||||
search_indexing: 2
|
||||
]
|
||||
|
||||
config :pleroma, Pleroma.Formatter,
|
||||
|
|
@ -676,12 +658,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,
|
||||
|
|
@ -816,7 +812,7 @@ config :pleroma, :modules, runtime_dir: "instance/modules"
|
|||
config :pleroma, configurable_from_database: true
|
||||
|
||||
config :pleroma, Pleroma.Repo,
|
||||
parameters: [gin_fuzzy_search_limit: "500"],
|
||||
parameters: [gin_fuzzy_search_limit: "500", jit: "off"],
|
||||
prepare: :unnamed
|
||||
|
||||
config :pleroma, :connections_pool,
|
||||
|
|
@ -908,11 +904,28 @@ 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.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.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"
|
||||
|
|
|
|||
|
|
@ -566,6 +566,20 @@ config :pleroma, :config_description, [
|
|||
"Cool instance"
|
||||
]
|
||||
},
|
||||
%{
|
||||
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,
|
||||
|
|
@ -1187,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}]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -1202,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,
|
||||
|
|
@ -1235,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,
|
||||
|
|
@ -1444,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 +1951,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 +3110,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 +3376,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]
|
||||
},
|
||||
%{
|
||||
|
|
@ -3472,5 +3486,48 @@ config :pleroma, :config_description, [
|
|||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: Pleroma.Search,
|
||||
type: :group,
|
||||
description: "General search settings.",
|
||||
children: [
|
||||
%{
|
||||
key: :module,
|
||||
type: :keyword,
|
||||
description: "Selected search module.",
|
||||
suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
|
||||
}
|
||||
]
|
||||
},
|
||||
%{
|
||||
group: :pleroma,
|
||||
key: Pleroma.Search.Meilisearch,
|
||||
type: :group,
|
||||
description: "Meilisearch settings.",
|
||||
children: [
|
||||
%{
|
||||
key: :url,
|
||||
type: :string,
|
||||
description: "Meilisearch URL.",
|
||||
suggestion: ["http://127.0.0.1:7700/"]
|
||||
},
|
||||
%{
|
||||
key: :private_key,
|
||||
type: :string,
|
||||
description:
|
||||
"Private key for meilisearch authentication, or `nil` to disable private key authentication.",
|
||||
suggestion: [nil]
|
||||
},
|
||||
%{
|
||||
key: :initial_indexing_chunk_size,
|
||||
type: :int,
|
||||
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",
|
||||
suggestion: [100_000]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -133,10 +133,47 @@ config :pleroma, :side_effects,
|
|||
ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock,
|
||||
logger: Pleroma.LoggerMock
|
||||
|
||||
config :pleroma, Pleroma.Search, module: Pleroma.Search.DatabaseSearch
|
||||
|
||||
config :pleroma, Pleroma.Search.Meilisearch, url: "http://127.0.0.1:7700/", private_key: nil
|
||||
|
||||
# Reduce recompilation time
|
||||
# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects
|
||||
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
|
||||
|
||||
if File.exists?("./config/test.secret.exs") do
|
||||
import_config "test.secret.exs"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue