From b22f54eb29237b4c34a26b497f88770dbebf5578 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 16 May 2021 12:26:32 -0500 Subject: Make prod.secret.exs optional (with warning) --- config/prod.exs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/prod.exs b/config/prod.exs index adbce5606..0e151000b 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -63,7 +63,12 @@ config :logger, :ex_syslogger, level: :info # Finally import the config/prod.secret.exs # which should be versioned separately. -import_config "prod.secret.exs" +if File.exists?("./config/prod.secret.exs") do + import_config "prod.secret.exs" +else + "`config/prod.secret.exs` not found. You may want to create one by running `mix pleroma.instance gen`" + |> IO.warn([]) +end if File.exists?("./config/prod.exported_from_db.secret.exs"), do: import_config("prod.exported_from_db.secret.exs") -- cgit v1.2.3 From e3173a279dad89dfce6eae89368ad3ba180c0490 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 19 May 2021 14:27:02 -0500 Subject: Put Plugs in runtime mode in :dev, :test to speed up recompilation --- config/dev.exs | 4 ++++ config/test.exs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'config') diff --git a/config/dev.exs b/config/dev.exs index 4faaeff5b..8e7d5c587 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -54,6 +54,10 @@ config :pleroma, Pleroma.Repo, config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: true +# Reduce recompilation time +# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects +config :phoenix, :plug_init_mode, :runtime + if File.exists?("./config/dev.secret.exs") do import_config "dev.secret.exs" else diff --git a/config/test.exs b/config/test.exs index 87396a88d..007951097 100644 --- a/config/test.exs +++ b/config/test.exs @@ -133,6 +133,10 @@ config :pleroma, :side_effects, ap_streamer: Pleroma.Web.ActivityPub.ActivityPubMock, logger: Pleroma.LoggerMock +# Reduce recompilation time +# https://dashbit.co/blog/speeding-up-re-compilation-of-elixir-projects +config :phoenix, :plug_init_mode, :runtime + if File.exists?("./config/test.secret.exs") do import_config "test.secret.exs" else -- cgit v1.2.3 From fe40f6f2910967609f7aa952d69981cadc47372c Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 20 May 2021 13:55:37 -0500 Subject: Switch from the deprecated "use Mix.config" to "import Config" --- config/benchmark.exs | 2 +- config/config.exs | 2 +- config/description.exs | 2 +- config/dev.exs | 2 +- config/dokku.exs | 2 +- config/prod.exs | 2 +- config/test.exs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/benchmark.exs b/config/benchmark.exs index 5567ff26e..a4d048f1b 100644 --- a/config/benchmark.exs +++ b/config/benchmark.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config # We don't run a server during test. If one is required, # you can enable the server option below. diff --git a/config/config.exs b/config/config.exs index 4381068ac..d333c618e 100644 --- a/config/config.exs +++ b/config/config.exs @@ -41,7 +41,7 @@ # # This configuration file is loaded before any dependency and # is restricted to this project. -use Mix.Config +import Config # General application configuration config :pleroma, ecto_repos: [Pleroma.Repo] diff --git a/config/description.exs b/config/description.exs index bb1f43305..f00c53d28 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config websocket_config = [ path: "/websocket", diff --git a/config/dev.exs b/config/dev.exs index 4faaeff5b..cfe3cce47 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config # For development, we disable any cache and enable # debugging and code reloading. diff --git a/config/dokku.exs b/config/dokku.exs index 9ea0ec450..1cc396c3d 100644 --- a/config/dokku.exs +++ b/config/dokku.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config config :pleroma, Pleroma.Web.Endpoint, http: [ diff --git a/config/prod.exs b/config/prod.exs index 0e151000b..968f596e0 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config # For production, we often load configuration from external # sources, such as your system environment. For this reason, diff --git a/config/test.exs b/config/test.exs index 87396a88d..c531b1290 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,4 +1,4 @@ -use Mix.Config +import Config # We don't run a server during test. If one is required, # you can enable the server option below. -- cgit v1.2.3 From 69aed310de48ccd80326c7b639d8e179dfd21ba8 Mon Sep 17 00:00:00 2001 From: Snow Date: Sat, 29 May 2021 02:22:33 +0000 Subject: Adding description --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index f00c53d28..1c3e3f900 100644 --- a/config/description.exs +++ b/config/description.exs @@ -682,7 +682,7 @@ config :pleroma, :config_description, [ %{ key: :allow_relay, type: :boolean, - description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance" + description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance. (Important!) This will increase the visibility of your instance." }, %{ key: :public, -- cgit v1.2.3 From ff00b354fa5067c898e860e275748dd757cb04cd Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 3 Aug 2020 17:08:35 -0500 Subject: Rename the non-federating Chat feature to Shout --- config/config.exs | 4 ++-- config/description.exs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index d333c618e..8c8ed5224 100644 --- a/config/config.exs +++ b/config/config.exs @@ -190,7 +190,7 @@ config :pleroma, :instance, instance_thumbnail: "/instance/thumbnail.jpeg", limit: 5_000, description_limit: 5_000, - chat_limit: 5_000, + shout_limit: 5_000, remote_limit: 100_000, upload_limit: 16_000_000, avatar_upload_limit: 2_000_000, @@ -457,7 +457,7 @@ config :pleroma, :media_preview_proxy, image_quality: 85, min_content_length: 100 * 1024 -config :pleroma, :chat, enabled: true +config :pleroma, :shoutbox, enabled: true config :phoenix, :format_encoders, json: Jason diff --git a/config/description.exs b/config/description.exs index f00c53d28..040deab96 100644 --- a/config/description.exs +++ b/config/description.exs @@ -545,9 +545,9 @@ config :pleroma, :config_description, [ ] }, %{ - key: :chat_limit, + key: :shout_limit, type: :integer, - description: "Character limit of the instance chat messages", + description: "Character limit of the instance shout messages", suggestions: [ 5_000 ] @@ -2652,9 +2652,9 @@ config :pleroma, :config_description, [ }, %{ group: :pleroma, - key: :chat, + key: :shout, type: :group, - description: "Pleroma chat settings", + description: "Pleroma shout settings", children: [ %{ key: :enabled, -- cgit v1.2.3 From 68aa56b9e4fbf4697d5ff0c41cf2fe7230738fe6 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 3 Aug 2020 17:58:27 -0500 Subject: Just call it shout --- config/config.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 8c8ed5224..e2bf0cfc1 100644 --- a/config/config.exs +++ b/config/config.exs @@ -457,7 +457,7 @@ config :pleroma, :media_preview_proxy, image_quality: 85, min_content_length: 100 * 1024 -config :pleroma, :shoutbox, enabled: true +config :pleroma, :shout, enabled: true config :phoenix, :format_encoders, json: Jason -- cgit v1.2.3 From 36fe8950f78b32e4ae8b845c099498a9acda7183 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Mon, 3 Aug 2020 18:00:16 -0500 Subject: Update PleromaFE settings for the old chat box --- config/description.exs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 040deab96..a17d222ce 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1182,7 +1182,7 @@ config :pleroma, :config_description, [ alwaysShowSubjectInput: true, background: "/static/aurora_borealis.jpg", collapseMessageWithSubject: false, - disableChat: false, + disableShout: false, greentext: false, hideFilteredStatuses: false, hideMutedPosts: false, @@ -1230,10 +1230,10 @@ config :pleroma, :config_description, [ "When a message has a subject (aka Content Warning), collapse it by default" }, %{ - key: :disableChat, - label: "PleromaFE Chat", + key: :disableShout, + label: "PleromaFE Shout", type: :boolean, - description: "Disables PleromaFE Chat component" + description: "Disables PleromaFE Shout component" }, %{ key: :greentext, -- cgit v1.2.3 From d6432a65da7ad11f1383d465370c11de5a2d7ddc Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 4 Aug 2020 10:42:52 -0500 Subject: Move shout configuration from :instance, update docs and changelog --- config/config.exs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e2bf0cfc1..2f8a18788 100644 --- a/config/config.exs +++ b/config/config.exs @@ -190,7 +190,6 @@ config :pleroma, :instance, instance_thumbnail: "/instance/thumbnail.jpeg", limit: 5_000, description_limit: 5_000, - shout_limit: 5_000, remote_limit: 100_000, upload_limit: 16_000_000, avatar_upload_limit: 2_000_000, @@ -457,7 +456,9 @@ config :pleroma, :media_preview_proxy, image_quality: 85, min_content_length: 100 * 1024 -config :pleroma, :shout, enabled: true +config :pleroma, :shout, + enabled: true, + limit: 5_000 config :phoenix, :format_encoders, json: Jason -- cgit v1.2.3 From 8ff2d8d17d057d5a2e0f5df603812155d6985df0 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 4 Aug 2020 10:45:28 -0500 Subject: Update description file for new shout config setting location --- config/description.exs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index a17d222ce..7eecddaf5 100644 --- a/config/description.exs +++ b/config/description.exs @@ -544,14 +544,6 @@ config :pleroma, :config_description, [ 5_000 ] }, - %{ - key: :shout_limit, - type: :integer, - description: "Character limit of the instance shout messages", - suggestions: [ - 5_000 - ] - }, %{ key: :remote_limit, type: :integer, @@ -2658,7 +2650,16 @@ config :pleroma, :config_description, [ children: [ %{ key: :enabled, - type: :boolean + type: :boolean, + description: "Enables the backend Shoutbox chat feature." + }, + %{ + key: :limit, + type: :integer, + description: "Shout message character limit.", + suggestions: [ + 5_000 + ] } ] }, -- cgit v1.2.3 From dcf84ac12e830ebc17f63e2fea0bd47c75e9f981 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 1 Jun 2021 16:53:32 -0500 Subject: disableChat / disableShout didn't actually do anything for PleromaFE --- config/description.exs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 7eecddaf5..c93a00782 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1174,7 +1174,6 @@ config :pleroma, :config_description, [ alwaysShowSubjectInput: true, background: "/static/aurora_borealis.jpg", collapseMessageWithSubject: false, - disableShout: false, greentext: false, hideFilteredStatuses: false, hideMutedPosts: false, @@ -1221,12 +1220,6 @@ config :pleroma, :config_description, [ description: "When a message has a subject (aka Content Warning), collapse it by default" }, - %{ - key: :disableShout, - label: "PleromaFE Shout", - type: :boolean, - description: "Disables PleromaFE Shout component" - }, %{ key: :greentext, label: "Greentext", -- cgit v1.2.3 From 297feb73f4ea2de59cf3fc8f4beabe18e72a6311 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 2 Jun 2021 11:21:04 -0500 Subject: Formatting --- config/description.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index 1c3e3f900..abd802ac0 100644 --- a/config/description.exs +++ b/config/description.exs @@ -682,7 +682,8 @@ config :pleroma, :config_description, [ %{ key: :allow_relay, type: :boolean, - description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance. (Important!) This will increase the visibility of your instance." + description: + "Enable Pleroma's Relay, which makes it possible to follow a whole instance. (Important!) This will increase the visibility of your instance." }, %{ key: :public, -- cgit v1.2.3 From 679d4c23e93f86f3e3fec70e0ac9bf2c9cdf8819 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 2 Jun 2021 11:26:26 -0500 Subject: Update wording for relays in docs and config description --- config/description.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') diff --git a/config/description.exs b/config/description.exs index abd802ac0..bdde22f98 100644 --- a/config/description.exs +++ b/config/description.exs @@ -683,7 +683,7 @@ config :pleroma, :config_description, [ key: :allow_relay, type: :boolean, description: - "Enable Pleroma's Relay, which makes it possible to follow a whole instance. (Important!) This will increase the visibility of your instance." + "Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance." }, %{ key: :public, -- cgit v1.2.3