diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/benchmark.exs | 84 | ||||
| -rw-r--r-- | config/config.exs | 23 | ||||
| -rw-r--r-- | config/description.exs | 43 | ||||
| -rw-r--r-- | config/releases.exs | 2 | 
4 files changed, 139 insertions, 13 deletions
| diff --git a/config/benchmark.exs b/config/benchmark.exs new file mode 100644 index 000000000..dd99cf5fd --- /dev/null +++ b/config/benchmark.exs @@ -0,0 +1,84 @@ +use Mix.Config + +# We don't run a server during test. If one is required, +# you can enable the server option below. +config :pleroma, Pleroma.Web.Endpoint, +  http: [port: 4001], +  url: [port: 4001], +  server: true + +# Disable captha for tests +config :pleroma, Pleroma.Captcha, +  # It should not be enabled for automatic tests +  enabled: false, +  # A fake captcha service for tests +  method: Pleroma.Captcha.Mock + +# Print only warnings and errors during test +config :logger, level: :warn + +config :pleroma, :auth, oauth_consumer_strategies: [] + +config :pleroma, Pleroma.Upload, filters: [], link_name: false + +config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads" + +config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Test, enabled: true + +config :pleroma, :instance, +  email: "admin@example.com", +  notify_email: "noreply@example.com", +  skip_thread_containment: false, +  federating: false, +  external_user_synchronization: false + +config :pleroma, :activitypub, sign_object_fetches: false + +# Configure your database +config :pleroma, Pleroma.Repo, +  adapter: Ecto.Adapters.Postgres, +  username: "postgres", +  password: "postgres", +  database: "pleroma_test", +  hostname: System.get_env("DB_HOST") || "localhost", +  pool_size: 10 + +# Reduce hash rounds for testing +config :pbkdf2_elixir, rounds: 1 + +config :tesla, adapter: Tesla.Mock + +config :pleroma, :rich_media, +  enabled: false, +  ignore_hosts: [], +  ignore_tld: ["local", "localdomain", "lan"] + +config :web_push_encryption, :vapid_details, +  subject: "mailto:administrator@example.com", +  public_key: +    "BLH1qVhJItRGCfxgTtONfsOKDc9VRAraXw-3NsmjMngWSh7NxOizN6bkuRA7iLTMPS82PjwJAr3UoK9EC1IFrz4", +  private_key: "_-XZ0iebPrRfZ_o0-IatTdszYa8VCH1yLN-JauK7HHA" + +config :web_push_encryption, :http_client, Pleroma.Web.WebPushHttpClientMock + +config :pleroma_job_queue, disabled: true + +config :pleroma, Pleroma.ScheduledActivity, +  daily_user_limit: 2, +  total_user_limit: 3, +  enabled: false + +config :pleroma, :rate_limit, +  search: [{1000, 30}, {1000, 30}], +  app_account_creation: {10_000, 5}, +  password_reset: {1000, 30} + +config :pleroma, :http_security, report_uri: "https://endpoint.com" + +config :pleroma, :http, send_user_agent: false + +rum_enabled = System.get_env("RUM_ENABLED") == "true" +config :pleroma, :database, rum_enabled: rum_enabled +IO.puts("RUM enabled: #{rum_enabled}") + +config :pleroma, Pleroma.ReverseProxy.Client, Pleroma.ReverseProxy.ClientMock diff --git a/config/config.exs b/config/config.exs index f4d92102f..787809b27 100644 --- a/config/config.exs +++ b/config/config.exs @@ -59,10 +59,6 @@ scheduled_jobs =      _ -> []    end -scheduled_jobs = -  scheduled_jobs ++ -    [{"0 */6 * * * *", {Pleroma.Web.Websub, :refresh_subscriptions, []}}] -  config :pleroma, Pleroma.Scheduler,    global: true,    overlap: true, @@ -243,9 +239,7 @@ config :pleroma, :instance,    federation_incoming_replies_max_depth: 100,    federation_reachability_timeout_days: 7,    federation_publisher_modules: [ -    Pleroma.Web.ActivityPub.Publisher, -    Pleroma.Web.Websub, -    Pleroma.Web.Salmon +    Pleroma.Web.ActivityPub.Publisher    ],    allow_relay: true,    rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy, @@ -290,8 +284,8 @@ config :pleroma, :markup,    allow_tables: false,    allow_fonts: false,    scrub_policy: [ -    Pleroma.HTML.Transform.MediaProxy, -    Pleroma.HTML.Scrubber.Default +    Pleroma.HTML.Scrubber.Default, +    Pleroma.HTML.Transform.MediaProxy    ]  config :pleroma, :frontend_configurations, @@ -328,6 +322,16 @@ config :pleroma, :assets,    ],    default_mascot: :pleroma_fox_tan +config :pleroma, :manifest, +  icons: [ +    %{ +      src: "/static/logo.png", +      type: "image/png" +    } +  ], +  theme_color: "#282c37", +  background_color: "#191b22" +  config :pleroma, :activitypub,    unfollow_blocked: true,    outgoing_blocks: true, @@ -599,6 +603,7 @@ config :pleroma, :web_cache_ttl,    activity_pub: nil,    activity_pub_question: 30_000 +config :swarm, node_blacklist: [~r/myhtml_.*$/]  # 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 b007cf69c..70e963399 100644 --- a/config/description.exs +++ b/config/description.exs @@ -581,9 +581,7 @@ config :pleroma, :config_description, [          type: [:list, :module],          description: "List of modules for federation publishing",          suggestions: [ -          Pleroma.Web.ActivityPub.Publisher, -          Pleroma.Web.Websub, -          Pleroma.Web.Salmo +          Pleroma.Web.ActivityPub.Publisher          ]        },        %{ @@ -1102,6 +1100,45 @@ config :pleroma, :config_description, [    },    %{      group: :pleroma, +    key: :manifest, +    type: :group, +    description: +      "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE", +    children: [ +      %{ +        key: :icons, +        type: {:list, :map}, +        description: "Describe the icons of the app", +        suggestion: [ +          %{ +            src: "/static/logo.png" +          }, +          %{ +            src: "/static/icon.png", +            type: "image/png" +          }, +          %{ +            src: "/static/icon.ico", +            sizes: "72x72 96x96 128x128 256x256" +          } +        ] +      }, +      %{ +        key: :theme_color, +        type: :string, +        description: "Describe the theme color of the app", +        suggestions: ["#282c37", "mediumpurple"] +      }, +      %{ +        key: :background_color, +        type: :string, +        description: "Describe the background color of the app", +        suggestions: ["#191b22", "aliceblue"] +      } +    ] +  }, +  %{ +    group: :pleroma,      key: :mrf_simple,      type: :group,      description: "Message Rewrite Facility", diff --git a/config/releases.exs b/config/releases.exs index 98c5ceccd..36c493673 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -1,6 +1,6 @@  import Config -config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" +config :pleroma, :instance, static: "/var/lib/pleroma/static"  config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads"  config_path = System.get_env("PLEROMA_CONFIG_PATH") || "/etc/pleroma/config.exs" | 
