fix: require Docker Compose v2 in scripts and docs
Build Admin / Build image (push) Successful in 8s
Build Admin / Build image (push) Successful in 8s
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) <noreply@anthropic.com>
This commit is contained in:
4 files changed
+15
-10
No files matched your search
@@ -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=<openssl rand -hex 32>
|
||||
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: `<url-prefix> <upstream-host> <upstream-path-prefix>`. 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
|
||||
|
||||
+3
-2
@@ -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
|
||||
|
||||
+3
-3
@@ -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 "=========================================="
|
||||
@@ -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"
|
||||
Reference in new issue
Block a user