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