Merge branch 'use-media-proxy-in-suggestions-api' into 'develop'
[akkoma] / config / config.exs
1 # This file is responsible for configuring your application
2 # and its dependencies with the aid of the Mix.Config module.
3 #
4 # This configuration file is loaded before any dependency and
5 # is restricted to this project.
6 use Mix.Config
7
8 # General application configuration
9 config :pleroma, ecto_repos: [Pleroma.Repo]
10
11 config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
12
13 config :pleroma, Pleroma.Upload,
14 uploader: Pleroma.Uploaders.Local,
15 strip_exif: false
16
17 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
18
19 config :pleroma, Pleroma.Uploaders.S3, s3_bucket: nil
20
21 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
22
23 config :pleroma, :uri_schemes, additionnal_schemes: []
24
25 # Configures the endpoint
26 config :pleroma, Pleroma.Web.Endpoint,
27 url: [host: "localhost"],
28 protocol: "https",
29 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
30 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
31 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]
32
33 # Configures Elixir's Logger
34 config :logger, :console,
35 format: "$time $metadata[$level] $message\n",
36 metadata: [:request_id]
37
38 config :mime, :types, %{
39 "application/xml" => ["xml"],
40 "application/xrd+xml" => ["xrd+xml"],
41 "application/activity+json" => ["activity+json"],
42 "application/ld+json" => ["activity+json"]
43 }
44
45 config :pleroma, :websub, Pleroma.Web.Websub
46 config :pleroma, :ostatus, Pleroma.Web.OStatus
47 config :pleroma, :httpoison, Pleroma.HTTP
48
49 version =
50 with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
51 "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
52 else
53 _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
54 end
55
56 # Configures http settings, upstream proxy etc.
57 config :pleroma, :http, proxy_url: nil
58
59 config :pleroma, :instance,
60 version: version,
61 name: "Pleroma",
62 email: "example@example.com",
63 description: "A Pleroma instance, an alternative fediverse server",
64 limit: 5000,
65 upload_limit: 16_000_000,
66 registrations_open: true,
67 federating: true,
68 allow_relay: true,
69 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
70 public: true,
71 quarantined_instances: []
72
73 config :pleroma, :fe,
74 theme: "pleroma-dark",
75 logo: "/static/logo.png",
76 background: "/static/aurora_borealis.jpg",
77 redirect_root_no_login: "/main/all",
78 redirect_root_login: "/main/friends",
79 show_instance_panel: true,
80 scope_options_enabled: false,
81 collapse_message_with_subject: false
82
83 config :pleroma, :activitypub,
84 accept_blocks: true,
85 unfollow_blocked: true,
86 outgoing_blocks: true
87
88 config :pleroma, :user, deny_follow_blocked: true
89
90 config :pleroma, :mrf_rejectnonpublic,
91 allow_followersonly: false,
92 allow_direct: false
93
94 config :pleroma, :mrf_simple,
95 media_removal: [],
96 media_nsfw: [],
97 federated_timeline_removal: [],
98 reject: [],
99 accept: []
100
101 config :pleroma, :media_proxy,
102 enabled: false,
103 redirect_on_failure: true
104
105 # base_url: "https://cache.pleroma.social"
106
107 config :pleroma, :chat, enabled: true
108
109 config :ecto, json_library: Jason
110
111 config :phoenix, :format_encoders, json: Jason
112
113 config :pleroma, :gopher,
114 enabled: false,
115 ip: {0, 0, 0, 0},
116 port: 9999
117
118 config :pleroma, :suggestions,
119 enabled: false,
120 third_party_engine:
121 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
122 timeout: 300_000,
123 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
124
125 # Import environment specific config. This must remain at the bottom
126 # of this file so it overrides the configuration defined above.
127 import_config "#{Mix.env()}.exs"