import Config config :pleroma, Pleroma.Web.Endpoint, url: [host: "pleroma.example.com", scheme: "https", port: 443], http: [ip: {127, 0, 0, 1}, port: 4000] config :pleroma, Pleroma.Repo, adapter: Ecto.Adapters.Postgres, username: "pleroma", database: "pleroma", socket_dir: "/run/postgresql", pool_size: 10 # We can't store the secrets in this file, since this is baked into the docker image if not File.exists?("/var/lib/pleroma/secret.exs") do secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64) signing_salt = :crypto.strong_rand_bytes(8) |> Base.encode64() |> binary_part(0, 8) {web_push_public_key, web_push_private_key} = :crypto.generate_key(:ecdh, :prime256v1) secret_file = EEx.eval_string( """ import Config config :pleroma, Pleroma.Web.Endpoint, secret_key_base: "<%= secret %>", signing_salt: "<%= signing_salt %>" config :web_push_encryption, :vapid_details, public_key: "<%= web_push_public_key %>", private_key: "<%= web_push_private_key %>" """, secret: secret, signing_salt: signing_salt, web_push_public_key: Base.url_encode64(web_push_public_key, padding: false), web_push_private_key: Base.url_encode64(web_push_private_key, padding: false) ) File.write("/var/lib/pleroma/secret.exs", secret_file) end import_config("/var/lib/pleroma/secret.exs") # Configure web push notifications config :web_push_encryption, :vapid_details, subject: "mailto:pleroma@example.com" config :pleroma, :database, rum_enabled: false config :pleroma, :instance, static_dir: "/var/lib/pleroma/static" config :pleroma, Pleroma.Uploaders.Local, uploads: "/var/lib/pleroma/uploads" config :pleroma, :static_fe, enabled: false config :pleroma, :frontend_configurations, pleroma_fe: %{ theme: "breezy-dark", chatDisabled: true, webPushNotifications: true, showFeaturesPanel: false, collapseMessageWithSubject: false, hideUserStats: false } config :pleroma, :instance, name: "pleroma", email: "pleroma@example.com", limit: 5000, registrations_open: false, invites_enabled: true, account_activation_required: false, remote_post_retention_days: 50, external_user_synchronization: true, allowed_post_formats: [ "text/plain", "text/html", "text/markdown" ] config :pleroma, :media_proxy, enabled: false, redirect_on_failure: true, base_url: "https://cache.domain.tld" config :pleroma, :fetch_initial_posts, enabled: false, pages: 1 config :pleroma, :chat, enabled: false