index.community/backend/config/releases.exs

48 lines
1.4 KiB
Elixir
Raw Normal View History

2019-07-14 11:47:06 +00:00
# This file is for *runtime configuration in releases* only.
# https://hexdocs.pm/phoenix/releases.html#runtime-configuration
import Config
2019-07-14 13:40:54 +00:00
ssl =
case System.get_env("MIX_ENV") do
"prod" -> true
_ -> false
end
2019-07-14 11:47:06 +00:00
config :backend, Backend.Repo,
2019-07-14 13:40:54 +00:00
url: System.get_env("DATABASE_URL"),
2019-07-14 11:47:06 +00:00
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
2019-07-14 13:40:54 +00:00
ssl: ssl
2019-07-14 11:47:06 +00:00
2019-07-26 22:30:11 +00:00
config :backend, Backend.Elasticsearch.Cluster,
url: System.get_env("ELASTICSEARCH_URL") || "http://localhost:9200"
2019-07-14 11:47:06 +00:00
2019-07-27 10:13:42 +00:00
config :appsignal, :config, revision: System.get_env("GIT_REV")
2019-07-14 11:47:06 +00:00
port = String.to_integer(System.get_env("PORT") || "4000")
config :backend, BackendWeb.Endpoint,
http: [:inet6, port: port],
url: [host: System.get_env("BACKEND_HOSTNAME"), port: port],
root: ".",
secret_key_base: System.get_env("SECRET_KEY_BASE"),
server: true
2019-07-25 15:56:03 +00:00
config :ex_twilio,
account_sid: System.get_env("TWILIO_ACCOUNT_SID"),
auth_token: System.get_env("TWILIO_AUTH_TOKEN")
config :backend, :crawler,
admin_phone: System.get_env("ADMIN_PHONE"),
twilio_phone: System.get_env("TWILIO_PHONE"),
2019-07-26 14:34:23 +00:00
admin_email: System.get_env("ADMIN_EMAIL"),
frontend_domain: System.get_env("FRONTEND_DOMAIN")
2019-07-25 15:56:03 +00:00
config :backend, Backend.Mailer,
adapter: Swoosh.Adapters.Sendgrid,
api_key: System.get_env("SENDGRID_API_KEY")
2020-10-13 16:26:26 +00:00
config :backend, Mastodon.Messenger,
domain: System.get_env("MASTODON_DOMAIN"),
token: System.get_env("MASTODON_TOKEN")