From 164d5dab8b8075d30272462df6edf228e2618705 Mon Sep 17 00:00:00 2001 From: Till JS Date: Tue, 28 Apr 2026 15:47:48 +0200 Subject: [PATCH] fix(mana-llm): copy aliases.yaml into Docker image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main.py's lifespan handler loads `Path(__file__).parent.parent / 'aliases.yaml'` (= /app/aliases.yaml) on startup. The Dockerfile only copied `src/`, so prod containers always crashlooped on first start with `AliasConfigError: alias config not found at /app/aliases.yaml` — which is why mana-llm has been silently absent from prod. Surfaced today after a manual `gh workflow run cd-macmini.yml -f service= mana-llm` actually attempted to start the container instead of relying on a long-stale image. Tested locally: container now starts cleanly, /health returns 200, and `/v1/aliases` lists the configured chains. Co-Authored-By: Claude Opus 4.7 (1M context) --- services/mana-llm/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/mana-llm/Dockerfile b/services/mana-llm/Dockerfile index 58c3ddc21..8d782184e 100644 --- a/services/mana-llm/Dockerfile +++ b/services/mana-llm/Dockerfile @@ -23,8 +23,12 @@ RUN useradd -m -u 1000 appuser # Copy installed packages from builder COPY --from=builder /root/.local /home/appuser/.local -# Copy application code +# Copy application code + alias config. `aliases.yaml` is loaded by +# main.py's lifespan handler from `Path(__file__).parent.parent / +# 'aliases.yaml'` = /app/aliases.yaml. Without it the FastAPI app +# raises AliasConfigError on startup and the container crashloops. COPY --chown=appuser:appuser src/ ./src/ +COPY --chown=appuser:appuser aliases.yaml ./aliases.yaml # Set environment ENV PATH=/home/appuser/.local/bin:$PATH