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) <noreply@anthropic.com>
This commit is contained in:
Artyom
2026-10-29 03:21:08 +03:00
co-authored by Claude Opus 5.5
parent b9d28d190e
commit 0b85edfdea
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -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 под запросами
+2 -1
View File
@@ -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