Skip to content

feat(deploy): support extra compose override files via BUZZ_COMPOSE_EXTRA_FILES - #4152

Open
kajukabla wants to merge 1 commit into
block:mainfrom
kajukabla:claude/elastic-haslett-9c80f6
Open

feat(deploy): support extra compose override files via BUZZ_COMPOSE_EXTRA_FILES#4152
kajukabla wants to merge 1 commit into
block:mainfrom
kajukabla:claude/elastic-haslett-9c80f6

Conversation

@kajukabla

Copy link
Copy Markdown

Summary

deploy/compose/run.sh assembles its docker compose invocation from explicit -f flags (compose.yml plus the conditional caddy/dev overlays). Passing any explicit -f disables Compose's automatic compose.override.yml loading, so operators currently have no way to layer site-local overrides — a compose.override.yml sitting in the directory is silently ignored.

This adds a BUZZ_COMPOSE_EXTRA_FILES environment switch: a colon- or space-separated list of compose files appended as additional -f flags after the built-in ones, so operator values win the Compose merge. Missing entries fail fast with a clear error instead of a mid-command docker compose failure.

Real-world motivation: staging the relay on a shared ML box needed memory caps on the relay container, which today requires re-running docker update after every ./run.sh upgrade. With this change the cap lives in a small override file and survives upgrades:

# deploy/compose/compose.limits.yml
services:
  relay:
    mem_limit: 2g
BUZZ_COMPOSE_EXTRA_FILES=compose.limits.yml ./run.sh start

Changes

  • deploy/compose/run.sh — parse BUZZ_COMPOSE_EXTRA_FILES (colon- or space-separated), validate each path exists, append as -f flags after the built-in files; document the switch in ./run.sh help
  • deploy/compose/README.md — new "Site-local overrides" section with the resource-limit example and a note that explicit -f flags are why compose.override.yml is not auto-loaded

Testing

  • bash -n run.sh syntax check
  • Functional test with a stubbed docker on PATH asserting exact flags:
    • baseline (no var): -f compose.yml unchanged
    • colon-separated: -f compose.yml -f /tmp/x-limits.yml -f /tmp/x-labels.yml
    • space-separated: same result
    • missing file: exits 1 with BUZZ_COMPOSE_EXTRA_FILES entry not found: ...
    • combined with BUZZ_COMPOSE_TLS=true: extra file appended after compose.caddy.yml
  • just ci — all recipes pass except mobile-test, which fails on one pre-existing widget test (ChannelDetailPage keeps follow mode off while a tall newest message stays visible, mobile/test/features/channels/channel_detail_page_test.dart:1042). It fails identically on clean main (7e9b77f) and this PR touches only deploy/compose/, so it is unrelated.

🤖 Generated with Claude Code

…XTRA_FILES

deploy/compose/run.sh passes explicit -f flags to docker compose, which
disables automatic compose.override.yml loading, so operators had no way
to layer site-local overrides (resource limits, labels, host tweaks)
without editing tracked files or re-running docker update after every
upgrade.

Add BUZZ_COMPOSE_EXTRA_FILES: a colon- or space-separated list of
compose files appended as additional -f flags after the built-in ones,
so operator values win the Compose merge. Missing entries fail fast
with a clear error. Documented in ./run.sh help and the deploy README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: kajukabla <106099463+kajukabla@users.noreply.github.com>
@kajukabla
kajukabla requested a review from a team as a code owner August 1, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant