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