From de8fd9ba9076338d5c54977cf8f6e835fe74b6b8 Mon Sep 17 00:00:00 2001 From: kami Date: Fri, 3 Jul 2026 23:40:10 +0400 Subject: [PATCH] deploy: build on every service so `build ` can't no-op MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build: . lived only on mavend, so `docker compose build mavweb` (or any other module) silently built nothing and redeployed a stale mavenai:latest — a fixed binary looked deployed but wasn't. Moved build into the shared anchor; same image name means it's still built once, but naming any service now rebuilds. Co-Authored-By: Claude Opus 4.8 --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8711f38..aa9e21e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,13 +9,16 @@ x-image: &image # NOT "maven" — that's Apache Maven on Docker Hub and compose will happily # pull it, giving every container `mvn-entrypoint.sh` and exit 127. image: mavenai:latest + # build on EVERY service (same image name ⇒ built once) so `docker compose + # build ` actually rebuilds. With build on only one service, the + # others silently no-op and you deploy a stale binary. + build: . pull_policy: never # only ever the locally-built image restart: unless-stopped services: mavend: <<: *image - build: . command: ["mavend", "-config", "/opt/maven/config/mavend.json"] # the key lives ONLY here. deploy/db_key.env holds MAVEN_DB_KEY=. env_file: [./deploy/db_key.env]