- flake.nix: custom elixir_1_20_rc4 derivation via overrideAttrs on
beamPackages.elixir_1_19 with headless OTP 28; nixos-25.11 pinned
- mix.exs (ops + my): elixir ~> 1.20
- Dockerfile: note 1.19.5 stays until hexpm publishes 1.20 stable image
- New: ChatLive — full-screen AI ops chat with SSE streaming, scroll hook,
suggestion buttons, typing indicator, clear history
- New: RouterAgent — streams OpenAI-compatible SSE from router-agent svc;
configurable URL + API key via env; sends {:chunk,t}/:stream_done msgs to LiveView
- Router: add live /chat route under auth pipeline
- Layouts: AI Chat nav link + ScrollBottom JS hook inline
- Application: Finch pool started for RouterAgent HTTP client
- Priv/static: phoenix.min.js + phoenix_live_view.min.js bundled
- Config: ROUTER_AGENT_URL / ROUTER_AGENT_API_KEY in dev.exs + runtime.exs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
1.4 KiB
Elixir
34 lines
1.4 KiB
Elixir
import Config
|
|
|
|
# Runtime secrets — each release only requires its own secret key
|
|
if config_env() == :prod do
|
|
config :centralcloud_my, CentralcloudMy.Endpoint,
|
|
secret_key_base: System.get_env("MY_SECRET_KEY_BASE") || System.fetch_env!("MY_SECRET_KEY_BASE")
|
|
|
|
# OPS_SECRET_KEY_BASE only required when running the centralcloud_ops release
|
|
if ops_key = System.get_env("OPS_SECRET_KEY_BASE") do
|
|
config :centralcloud_ops, CentralcloudOps.Endpoint, secret_key_base: ops_key
|
|
end
|
|
end
|
|
|
|
config :centralcloud_core, :hostbill,
|
|
base_url: System.get_env("HOSTBILL_URL", "https://portal.centralcloud.com"),
|
|
api_id: System.get_env("HOSTBILL_API_ID"),
|
|
api_key: System.get_env("HOSTBILL_API_KEY")
|
|
|
|
config :centralcloud_core, :dr_portal,
|
|
base_url: System.get_env("DR_PORTAL_URL", "https://dr.centralcloud.com"),
|
|
api_key: System.get_env("DR_PORTAL_API_KEY")
|
|
|
|
config :centralcloud_core, :oncall,
|
|
base_url: System.get_env("ONCALL_URL", "https://oncall.centralcloud.com"),
|
|
token: System.get_env("ONCALL_API_TOKEN")
|
|
|
|
config :centralcloud_core, :oidc,
|
|
issuer: System.get_env("AUTHENTIK_ISSUER", "https://sso.centralcloud.com/application/o/centralcloud/"),
|
|
client_id: System.get_env("OIDC_CLIENT_ID"),
|
|
client_secret: System.get_env("OIDC_CLIENT_SECRET")
|
|
|
|
config :centralcloud_ops, :router_agent,
|
|
url: System.get_env("ROUTER_AGENT_URL", "http://router-agent.router-agent.svc:8642"),
|
|
api_key: System.get_env("ROUTER_AGENT_API_KEY", "")
|