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