diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2021-01-21 20:20:35 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2021-01-21 20:20:35 +0300 |
commit | 2634a16b4cefebfb2a13550bde3fd12e5acd9aaa (patch) | |
tree | 1c43808f90f13a9e055464f01e4c8a36b28fe50b /config | |
parent | b830605577f369d6b1a8730a5b3476ceea4fef5a (diff) | |
parent | d8860eaee46c9bc0a079e90dfb008c54923d7330 (diff) | |
download | pleroma-2634a16b4cefebfb2a13550bde3fd12e5acd9aaa.tar.gz pleroma-2634a16b4cefebfb2a13550bde3fd12e5acd9aaa.zip |
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework
# Conflicts:
# CHANGELOG.md
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 22 | ||||
-rw-r--r-- | config/description.exs | 56 | ||||
-rw-r--r-- | config/test.exs | 7 |
3 files changed, 68 insertions, 17 deletions
diff --git a/config/config.exs b/config/config.exs index 7b14fbfe5..c4a690799 100644 --- a/config/config.exs +++ b/config/config.exs @@ -64,14 +64,23 @@ config :pleroma, Pleroma.Upload, link_name: false, proxy_remote: false, filename_display_max_length: 30, - default_description: nil + default_description: nil, + base_url: nil config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads" config :pleroma, Pleroma.Uploaders.S3, bucket: nil, - streaming_enabled: true, - public_endpoint: "https://s3.amazonaws.com" + bucket_namespace: nil, + truncated_namespace: nil, + streaming_enabled: true + +config :ex_aws, :s3, + # host: "s3.wasabisys.com", # required if not Amazon AWS + access_key_id: nil, + secret_access_key: nil, + # region: "us-east-1", # may be required for Amazon AWS + scheme: "https://" config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"], @@ -542,7 +551,7 @@ config :pleroma, Oban, scheduled_activities: 10, background: 5, remote_fetcher: 2, - attachments_cleanup: 5, + attachments_cleanup: 1, new_users_digest: 1, mute_expire: 5 ], @@ -823,6 +832,11 @@ config :pleroma, Pleroma.User.Backup, limit_days: 7, dir: nil +config :pleroma, ConcurrentLimiter, [ + {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]}, + {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]} +] + # 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 c73d50f7d..b48616b22 100644 --- a/config/description.exs +++ b/config/description.exs @@ -150,17 +150,11 @@ config :pleroma, :config_description, [ suggestions: ["pleroma"] }, %{ - key: :public_endpoint, - type: :string, - description: "S3 endpoint", - suggestions: ["https://s3.amazonaws.com"] - }, - %{ key: :truncated_namespace, type: :string, description: "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <> - " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint." + " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url." }, %{ key: :streaming_enabled, @@ -3342,5 +3336,53 @@ config :pleroma, :config_description, [ suggestions: [:text, :protobuf] } ] + }, + %{ + group: :pleroma, + key: ConcurrentLimiter, + type: :group, + description: "Limits configuration for background tasks.", + children: [ + %{ + key: Pleroma.Web.RichMedia.Helpers, + type: :keyword, + description: "Concurrent limits configuration for getting RichMedia for activities.", + suggestions: [max_running: 5, max_waiting: 5], + children: [ + %{ + key: :max_running, + type: :integer, + description: "Max running concurrently jobs.", + suggestion: [5] + }, + %{ + key: :max_waiting, + type: :integer, + description: "Max waiting jobs.", + suggestion: [5] + } + ] + }, + %{ + key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, + type: :keyword, + description: "Concurrent limits configuration for MediaProxyWarmingPolicy.", + suggestions: [max_running: 5, max_waiting: 5], + children: [ + %{ + key: :max_running, + type: :integer, + description: "Max running concurrently jobs.", + suggestion: [5] + }, + %{ + key: :max_waiting, + type: :integer, + description: "Max waiting jobs.", + suggestion: [5] + } + ] + } + ] } ] diff --git a/config/test.exs b/config/test.exs index 7fc457463..690c98e40 100644 --- a/config/test.exs +++ b/config/test.exs @@ -53,7 +53,7 @@ config :pleroma, Pleroma.Repo, config :pleroma, :dangerzone, override_repo_pool_size: true # Reduce hash rounds for testing -config :pbkdf2_elixir, rounds: 1 +config :pleroma, :password, iterations: 1 config :tesla, adapter: Tesla.Mock @@ -115,11 +115,6 @@ config :pleroma, Pleroma.Web.Plugs.RemoteIp, enabled: false config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true -config :pleroma, Pleroma.Uploaders.S3, - bucket: nil, - streaming_enabled: true, - public_endpoint: nil - config :tzdata, :autoupdate, :disabled config :pleroma, :mrf, policies: [] |