cortex_status/config/runtime.exs

33 lines
1.2 KiB
Elixir

import Config
if System.get_env("PHX_SERVER") do
config :cortex_status, CortexStatusWeb.Endpoint, server: true
end
if config_env() == :prod do
secret_key_base =
System.get_env("SECRET_KEY_BASE") ||
raise """
environment variable SECRET_KEY_BASE is missing.
You can generate one by calling: mix phx.gen.secret
"""
host = System.get_env("PHX_HOST") || "cortex.hydrascale.net"
port = String.to_integer(System.get_env("PORT") || "4000")
config :cortex_status, CortexStatusWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
http: [ip: {127, 0, 0, 1}, port: port],
secret_key_base: secret_key_base,
check_origin: ["https://cortex.hydrascale.net", "https://status.hydrascale.net"]
config :cortex_status, :services,
symbiont_url: System.get_env("SYMBIONT_URL") || "http://127.0.0.1:8111",
dendrite_url: System.get_env("DENDRITE_URL") || "http://localhost:3000",
dendrite_api_key: System.get_env("DENDRITE_API_KEY") || "8dc5e8f7a02745ee8db90c94b2481fd9e1deeea1e2ce74420f54047859ea7edf",
monitored_sites: [
{"hydrascale.net", "https://hydrascale.net"},
{"git.hydrascale.net", "https://git.hydrascale.net"},
{"browser.hydrascale.net", "https://browser.hydrascale.net/health"}
]
end