From e90d67366aca15277363a9136669f26d5c43d4ad Mon Sep 17 00:00:00 2001 From: Vassiliy Yegorov Date: Sun, 20 Sep 2026 13:43:48 +0700 Subject: [PATCH] fix: require Docker Compose v2 in scripts and docs compose 1.29.2 aborts with KeyError: 'ContainerConfig' against Docker 28, which broke the deploy on the prod VM. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 12 ++++++++---- scripts/deploy.sh | 5 +++-- scripts/install.sh | 6 +++--- scripts/migrate-host-nginx.sh | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1e50f1b..7576376 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ TLS certificates are issued and renewed automatically by Let's Encrypt — no ce ## Quick Start +> Requires Docker Compose **v2** (`docker compose`). The legacy `docker-compose` 1.29.x fails on Docker 28 with `KeyError: 'ContainerConfig'`. +> +> `apt-get install -y docker-compose-v2` + ### Prerequisites - Ubuntu 24.04 VM - Ports **80** and **443** free and reachable from the internet (required for the ACME HTTP-01 challenge) @@ -34,7 +38,7 @@ ACME_EMAIL=you@example.com PROXY_SECRET= ALLOWED_CIDR=10.0.0.0/8,172.16.0.0/12 -docker-compose up -d +docker compose up -d ``` `DOMAIN` and `ACME_EMAIL` are mandatory — the entrypoint refuses to start without them. @@ -115,7 +119,7 @@ Arguments: ` `. The third argu Update the catch-all hint in the same snippet, then rebuild: ```bash -docker-compose up -d --build +docker compose up -d --build ``` --- @@ -184,10 +188,10 @@ For OpenAI-compatible SDKs set `baseURL` to `https://proxy.bildme.ru/deepseek` a ```bash # Tail logs -docker-compose logs -f proxy | jq . +docker compose logs -f proxy | jq . # Requests per upstream per minute -docker-compose logs --since=1m proxy --no-log-prefix \ +docker compose logs --since=1m proxy --no-log-prefix \ | jq -r 'select(.logger=="http.log.access") | .request.uri' \ | cut -d'/' -f2 \ | sort | uniq -c | sort -rn diff --git a/scripts/deploy.sh b/scripts/deploy.sh index bfbc62b..1ca6313 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -6,8 +6,9 @@ set -euo pipefail PROXY_DIR="${PROXY_DIR:-/srv/elevenlabs}" cd "${PROXY_DIR}" -COMPOSE="docker-compose" -command -v docker-compose >/dev/null 2>&1 || COMPOSE="docker compose" +# compose v1 (1.29.x) breaks against Docker 28 with KeyError: 'ContainerConfig' — prefer v2 +COMPOSE="docker compose" +docker compose version >/dev/null 2>&1 || COMPOSE="docker-compose" echo "=== [1/4] Pulling latest image ===" ${COMPOSE} pull diff --git a/scripts/install.sh b/scripts/install.sh index 42cabdc..ec9eb9f 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -8,7 +8,7 @@ REPO_URL="https://github.com/YOUR_ORG/YOUR_REPO.git" # TODO: replace with actua echo "=== [1/6] Installing Docker and dependencies ===" apt-get update -qq -apt-get install -y docker.io docker-compose-plugin git curl +apt-get install -y docker.io docker-compose-v2 git curl echo "=== [2/6] Enabling Docker ===" systemctl enable --now docker @@ -40,7 +40,7 @@ else fi echo "=== [6/6] Starting containers ===" -docker-compose up -d +docker compose up -d echo "" echo "==========================================" @@ -49,5 +49,5 @@ echo " Health check: curl http://localhost:8082/health" echo "" echo " IMPORTANT: Edit ${PROXY_DIR}/.env" echo " - Set DOMAIN, ACME_EMAIL and ALLOWED_CIDR" -echo " - Then run: docker-compose up -d" +echo " - Then run: docker compose up -d" echo "==========================================" diff --git a/scripts/migrate-host-nginx.sh b/scripts/migrate-host-nginx.sh index 13de026..4a71b51 100755 --- a/scripts/migrate-host-nginx.sh +++ b/scripts/migrate-host-nginx.sh @@ -40,4 +40,4 @@ ss -tlnp | grep -E ':(80|443)\s' && { echo "Ports 80/443 are still busy — insp echo "Ports 80 and 443 are free." echo "" echo "Backup: ${BACKUP_DIR}" -echo "Next: cd /srv/elevenlabs && docker-compose pull && docker-compose up -d" +echo "Next: cd /srv/elevenlabs && docker compose pull && docker compose up -d"