Ceremony orchestrator + governance UI layer over substrate CRDs. guildhall presents and coordinates; substrate decides and enforces. Apps: - guildhall_web: Phoenix LiveView UI for ceremony workflows, Forge visualization, posture dashboards - guildhall_orchestrator: watches CeremonyRequest CRDs, notifies witnesses, collects signatures, tracks ceremony lifecycle - guildhall_ops_db: Ecto schemas for the five Ops DB tables (per DESIGN-OPS-DB-CHAIN-OF-CUSTODY-0001) - guildhall_graph_bridge: Microsoft Graph API reconciler (stub) - guildhall_chronicle: Chronicle event consumer + Ops DB projector (stub) Naming: guildhall components are orchestrators (workflow), NOT engines (enforcement). The ceremony engine is a substrate K8s operator. guildhall coordinates humans around CRDs. Elixir 1.17.3 / OTP 27 / Phoenix 1.8.5. SHA-256 git repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler J King <tking@guildhouse.dev>
56 lines
1.9 KiB
Elixir
56 lines
1.9 KiB
Elixir
import Config
|
|
|
|
# config/runtime.exs is executed for all environments, including during
|
|
# releases. It runs after compilation and before the system starts, so
|
|
# it's ideal for loading configuration from environment variables.
|
|
|
|
if System.get_env("PHX_SERVER") do
|
|
config :guildhall_web, GuildhallWeb.Endpoint, server: true
|
|
end
|
|
|
|
config :guildhall_web, GuildhallWeb.Endpoint,
|
|
http: [port: String.to_integer(System.get_env("PORT", "4000"))]
|
|
|
|
if config_env() == :prod do
|
|
# Ops DB — Postgres
|
|
database_url =
|
|
System.get_env("DATABASE_URL") ||
|
|
raise """
|
|
environment variable DATABASE_URL is missing.
|
|
For example: ecto://USER:PASS@HOST/DATABASE
|
|
"""
|
|
|
|
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
|
|
|
config :guildhall_ops_db, Guildhall.OpsDb.Repo,
|
|
url: database_url,
|
|
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
|
socket_options: maybe_ipv6
|
|
|
|
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") || "guildhall.guildhouse.dev"
|
|
|
|
config :guildhall_web, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
|
|
|
config :guildhall_web, GuildhallWeb.Endpoint,
|
|
url: [host: host, port: 443, scheme: "https"],
|
|
http: [ip: {0, 0, 0, 0, 0, 0, 0, 0}],
|
|
secret_key_base: secret_key_base
|
|
|
|
# K8s cluster connection (future — orchestrator will use this)
|
|
# config :guildhall_orchestrator,
|
|
# kubeconfig: System.get_env("KUBECONFIG") || "~/.kube/config",
|
|
# context: System.get_env("K8S_CONTEXT")
|
|
|
|
# Keycloak OIDC (future — auth)
|
|
# config :guildhall_web, :oidc,
|
|
# issuer: System.get_env("OIDC_ISSUER") || "https://auth.guildhouse.dev/realms/guildhouse",
|
|
# client_id: System.get_env("OIDC_CLIENT_ID"),
|
|
# client_secret: System.get_env("OIDC_CLIENT_SECRET")
|
|
end
|