deploy: split build into docker-compose.dev.yml (prod compose pulls only) #55

Merged
whitlocktech merged 2 commits from deploy/compose-dev-prod-split into main 2026-07-11 23:45:42 +00:00
Member

Follow-up to #54. That PR kept build: alongside image: in a single file; this makes the base docker-compose.yml strictly production-shaped and moves local builds to an explicit overlay, so a production host can never accidentally build.

Change

  • docker-compose.yml — remove build: from app and bot; image: only.
  • docker-compose.dev.yml (new) — adds build: back (app → Dockerfile, bot → bot/Dockerfile). Named explicitly so it is not auto-loaded like docker-compose.override.yml.

Why

With both build: and image: in one file, Compose gives build precedence for up --build/build, mixing two deployment modes. Keeping build: out of the base file makes an accidental production build impossible.

Usage

# Production — pull only
docker compose pull && docker compose up -d
IMAGE_TAG=sha-042a151 docker compose pull && docker compose up -d   # pin / rollback

# Development — build locally
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

Verified

docker compose config renders the base as image-only, no build for both services; the dev overlay adds build: back (app → Dockerfile, bot → bot/Dockerfile). README quick-start updated to the two-file flow.

🤖 Generated with Claude Code

https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ

Follow-up to #54. That PR kept `build:` alongside `image:` in a single file; this makes the base `docker-compose.yml` strictly **production-shaped** and moves local builds to an explicit overlay, so a production host can never accidentally build. ## Change - **`docker-compose.yml`** — remove `build:` from `app` and `bot`; `image:` only. - **`docker-compose.dev.yml`** (new) — adds `build:` back (app → `Dockerfile`, bot → `bot/Dockerfile`). Named explicitly so it is **not** auto-loaded like `docker-compose.override.yml`. ## Why With both `build:` and `image:` in one file, Compose gives `build` precedence for `up --build`/`build`, mixing two deployment modes. Keeping `build:` out of the base file makes an accidental production build impossible. ## Usage ```bash # Production — pull only docker compose pull && docker compose up -d IMAGE_TAG=sha-042a151 docker compose pull && docker compose up -d # pin / rollback # Development — build locally docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build ``` ## Verified `docker compose config` renders the base as **image-only, no build** for both services; the dev overlay adds `build:` back (app → `Dockerfile`, bot → `bot/Dockerfile`). README quick-start updated to the two-file flow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
wtclaude added 1 commit 2026-07-11 23:44:03 +00:00
Make the base docker-compose.yml strictly production-shaped — image: only, no
build: — so a production host can only ever pull, never accidentally build
(compose gives build precedence for `up --build`/`build`, which mixed the two
modes). Local builds move to an explicit, non-auto-loaded overlay.

  Production:   docker compose pull && docker compose up -d
  Development:  docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build

Verified with `docker compose config`: base renders image-only (no build) for
both services; the dev overlay adds build back (app -> Dockerfile,
bot -> bot/Dockerfile). README quick-start updated to the two-file flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
whitlocktech approved these changes 2026-07-11 23:45:25 +00:00
whitlocktech added 1 commit 2026-07-11 23:45:33 +00:00
whitlocktech merged commit 696d82f114 into main 2026-07-11 23:45:42 +00:00
whitlocktech deleted branch deploy/compose-dev-prod-split 2026-07-11 23:45:43 +00:00
Sign in to join this conversation.
No description provided.