From 0b85edfdeafb4f15c9d4604ad631a772eb883304 Mon Sep 17 00:00:00 2001 From: Artyom Date: Thu, 29 Oct 2026 03:21:08 +0300 Subject: [PATCH] Build the application image before compose plans the stand up --build decided which containers to recreate before the build finished, so relay and worker, which reuse the API image without a build section of their own, kept running the previous image after a code change. make up now builds first and then starts the stand, and every service runs the same fresh image. Co-Authored-By: Claude Opus 5.5 (1M context) --- AGENTS.md | 2 +- Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 72bd46a5..3471716e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,7 @@ make lint # ruff check + ruff format --check + ty check; make student-test # собственные тесты (одноразовые PostgreSQL, Valkey, RustFS и RabbitMQ в Docker) make secrets # локальные secrets/* (PostgreSQL, Valkey, S3 root/API/worker, RabbitMQ) и .env -make up # docker compose up -d --build --wait: хранилища и broker → migrate, s3-init → api ×2, relay, worker → lb +make up # docker compose build, затем up -d --wait (relay и worker пересоздаются на новом образе): хранилища и broker → migrate, s3-init → api ×2, relay, worker → lb make test # публичный smoke через LB (BASE_URL, по умолчанию http://localhost:8080) make test-persistence ACTION_SCRIPT=scripts/restart.sh # рестарт lb, api, relay, worker и postgres, valkey, s3, broker с volumes make test-failover ACTION_SCRIPT=scripts/stop-one.sh # остановка реплики TARGET_INSTANCE_ID под запросами diff --git a/Makefile b/Makefile index e4693f23..282c5c25 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,8 @@ secrets: sh scripts/broker-secrets.sh up: secrets - $(COMPOSE) up -d --build --wait + $(COMPOSE) build + $(COMPOSE) up -d --wait down: $(COMPOSE) down