fix(deploy): add releases: config for umbrella release

The Dockerfile's `mix release --overwrite` step failed because the
umbrella's root mix.exs lacked an explicit `releases:` block. Umbrella
projects cannot infer a default release — `mix release` requires the
operator to name which umbrella children go into each release and
their startup order.

Adds a single `:guildhall` release bundling all five umbrella apps as
:permanent, with startup order respecting the dep graph:
  guildhall_ops_db      (Repo — nothing else here starts without it)
  guildhall_chronicle
  guildhall_orchestrator
  guildhall_graph_bridge
  guildhall_web         (HTTP endpoint last, after Repo + contexts)

Each app's own `in_umbrella` deps in apps/*/mix.exs will back-stop
the ordering via OTP's dependency graph regardless, but the explicit
list is clearer and matches standard Phoenix-umbrella release idiom.

Mistake was in the prior Dockerfile commit (c6f1d07) planning — the
Dockerfile comment claimed the release name could be inferred from
the umbrella, which is true for single-app projects but not umbrellas.
No Dockerfile change needed; the fix is entirely in mix.exs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler J King <tking@guildhouse.dev>
This commit is contained in:
Tyler J King 2026-04-22 09:39:49 -04:00
parent 115bd178a2
commit 7730bf3818

23
mix.exs
View file

@ -6,7 +6,28 @@ defmodule Guildhall.MixProject do
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
deps: deps(),
releases: releases()
]
end
# Release configuration. Umbrella projects require an explicit
# `releases:` block — mix release cannot infer a default from the
# umbrella root because there is no single "application" to release.
# The `:guildhall` release bundles all five umbrella children in a
# startup order that respects the dep graph: ops_db first (the Repo
# other apps use), then infra apps, then the web endpoint last.
defp releases do
[
guildhall: [
applications: [
guildhall_ops_db: :permanent,
guildhall_chronicle: :permanent,
guildhall_orchestrator: :permanent,
guildhall_graph_bridge: :permanent,
guildhall_web: :permanent
]
]
]
end