Merge branch 'new-frontend-options' 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,
18 uploads: "uploads",
19 uploads_url: "{{base_url}}/media/{{file}}"
20
21 config :pleroma, Pleroma.Uploaders.S3,
22 bucket: nil,
23 public_endpoint: "https://s3.amazonaws.com"
24
25 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
26
27 config :pleroma, :uri_schemes,
28 valid_schemes: [
29 "https",
30 "http",
31 "dat",
32 "dweb",
33 "gopher",
34 "ipfs",
35 "ipns",
36 "irc",
37 "ircs",
38 "magnet",
39 "mailto",
40 "mumble",
41 "ssb",
42 "xmpp"
43 ]
44
45 # Configures the endpoint
46 config :pleroma, Pleroma.Web.Endpoint,
47 url: [host: "localhost"],
48 protocol: "https",
49 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
50 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
51 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
52 secure_cookie_flag: true
53
54 # Configures Elixir's Logger
55 config :logger, :console,
56 format: "$time $metadata[$level] $message\n",
57 metadata: [:request_id]
58
59 config :mime, :types, %{
60 "application/xml" => ["xml"],
61 "application/xrd+xml" => ["xrd+xml"],
62 "application/activity+json" => ["activity+json"],
63 "application/ld+json" => ["activity+json"]
64 }
65
66 config :pleroma, :websub, Pleroma.Web.Websub
67 config :pleroma, :ostatus, Pleroma.Web.OStatus
68 config :pleroma, :httpoison, Pleroma.HTTP
69
70 version =
71 with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
72 "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
73 else
74 _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
75 end
76
77 # Configures http settings, upstream proxy etc.
78 config :pleroma, :http, proxy_url: nil
79
80 config :pleroma, :instance,
81 version: version,
82 name: "Pleroma",
83 email: "example@example.com",
84 description: "A Pleroma instance, an alternative fediverse server",
85 limit: 5000,
86 upload_limit: 16_000_000,
87 registrations_open: true,
88 federating: true,
89 allow_relay: true,
90 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
91 public: true,
92 quarantined_instances: [],
93 managed_config: true,
94 allowed_post_formats: [
95 "text/plain",
96 "text/html",
97 "text/markdown"
98 ],
99 mrf_transparency: true
100
101 config :pleroma, :markup,
102 # XXX - unfortunately, inline images must be enabled by default right now, because
103 # of custom emoji. Issue #275 discusses defanging that somehow.
104 allow_inline_images: true,
105 allow_headings: false,
106 allow_tables: false,
107 allow_fonts: false,
108 scrub_policy: [
109 Pleroma.HTML.Transform.MediaProxy,
110 Pleroma.HTML.Scrubber.Default
111 ]
112
113 config :pleroma, :fe,
114 theme: "pleroma-dark",
115 logo: "/static/logo.png",
116 logo_mask: true,
117 logo_margin: "0.1em",
118 background: "/static/aurora_borealis.jpg",
119 redirect_root_no_login: "/main/all",
120 redirect_root_login: "/main/friends",
121 show_instance_panel: true,
122 scope_options_enabled: false,
123 formatting_options_enabled: false,
124 collapse_message_with_subject: false,
125 hide_post_stats: false,
126 hide_user_stats: false
127
128 config :pleroma, :activitypub,
129 accept_blocks: true,
130 unfollow_blocked: true,
131 outgoing_blocks: true,
132 follow_handshake_timeout: 500
133
134 config :pleroma, :user, deny_follow_blocked: true
135
136 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
137
138 config :pleroma, :mrf_rejectnonpublic,
139 allow_followersonly: false,
140 allow_direct: false
141
142 config :pleroma, :mrf_simple,
143 media_removal: [],
144 media_nsfw: [],
145 federated_timeline_removal: [],
146 reject: [],
147 accept: []
148
149 config :pleroma, :media_proxy,
150 enabled: false,
151 redirect_on_failure: true
152
153 # base_url: "https://cache.pleroma.social"
154
155 config :pleroma, :chat, enabled: true
156
157 config :ecto, json_library: Jason
158
159 config :phoenix, :format_encoders, json: Jason
160
161 config :pleroma, :gopher,
162 enabled: false,
163 ip: {0, 0, 0, 0},
164 port: 9999
165
166 config :pleroma, :suggestions,
167 enabled: false,
168 third_party_engine:
169 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
170 timeout: 300_000,
171 limit: 23,
172 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
173
174 # Import environment specific config. This must remain at the bottom
175 # of this file so it overrides the configuration defined above.
176 import_config "#{Mix.env()}.exs"