Merge branch 'feature/custom_media_url' 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, 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
37 # Configures Elixir's Logger
38 config :logger, :console,
39 format: "$time $metadata[$level] $message\n",
40 metadata: [:request_id]
41
42 config :mime, :types, %{
43 "application/xml" => ["xml"],
44 "application/xrd+xml" => ["xrd+xml"],
45 "application/activity+json" => ["activity+json"],
46 "application/ld+json" => ["activity+json"]
47 }
48
49 config :pleroma, :websub, Pleroma.Web.Websub
50 config :pleroma, :ostatus, Pleroma.Web.OStatus
51 config :pleroma, :httpoison, Pleroma.HTTP
52
53 version =
54 with {version, 0} <- System.cmd("git", ["rev-parse", "HEAD"]) do
55 "Pleroma #{Mix.Project.config()[:version]} #{String.trim(version)}"
56 else
57 _ -> "Pleroma #{Mix.Project.config()[:version]} dev"
58 end
59
60 # Configures http settings, upstream proxy etc.
61 config :pleroma, :http, proxy_url: nil
62
63 config :pleroma, :instance,
64 version: version,
65 name: "Pleroma",
66 email: "example@example.com",
67 description: "A Pleroma instance, an alternative fediverse server",
68 limit: 5000,
69 upload_limit: 16_000_000,
70 registrations_open: true,
71 federating: true,
72 allow_relay: true,
73 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
74 public: true,
75 quarantined_instances: [],
76 managed_config: true
77
78 config :pleroma, :fe,
79 theme: "pleroma-dark",
80 logo: "/static/logo.png",
81 logo_mask: true,
82 logo_margin: "0.1em",
83 background: "/static/aurora_borealis.jpg",
84 redirect_root_no_login: "/main/all",
85 redirect_root_login: "/main/friends",
86 show_instance_panel: true,
87 scope_options_enabled: false,
88 collapse_message_with_subject: false
89
90 config :pleroma, :activitypub,
91 accept_blocks: true,
92 unfollow_blocked: true,
93 outgoing_blocks: true
94
95 config :pleroma, :user, deny_follow_blocked: true
96
97 config :pleroma, :mrf_rejectnonpublic,
98 allow_followersonly: false,
99 allow_direct: false
100
101 config :pleroma, :mrf_simple,
102 media_removal: [],
103 media_nsfw: [],
104 federated_timeline_removal: [],
105 reject: [],
106 accept: []
107
108 config :pleroma, :media_proxy,
109 enabled: false,
110 redirect_on_failure: true
111
112 # base_url: "https://cache.pleroma.social"
113
114 config :pleroma, :chat, enabled: true
115
116 config :ecto, json_library: Jason
117
118 config :phoenix, :format_encoders, json: Jason
119
120 config :pleroma, :gopher,
121 enabled: false,
122 ip: {0, 0, 0, 0},
123 port: 9999
124
125 config :pleroma, :suggestions,
126 enabled: false,
127 third_party_engine:
128 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
129 timeout: 300_000,
130 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
131
132 # Import environment specific config. This must remain at the bottom
133 # of this file so it overrides the configuration defined above.
134 import_config "#{Mix.env()}.exs"