[AZ-1123] Document docker-compose.perf.yml port playbook
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-06-26 11:01:00 +03:00
parent d948311763
commit 179daae235
7 changed files with 143 additions and 6 deletions
@@ -14,7 +14,36 @@
| postgres | postgres:16 | 5433:5432 | Database (host port 5433 chosen to avoid conflicts with sibling-project Postgres instances on dev laptops) |
| api | Custom (Dockerfile) | 18980:8080, 18981:8081 | Application |
## Volumes
## Compose overlays (dev / test / perf)
The default `docker-compose.yml` publishes Postgres on host port **5433** so tools on the host can reach the DB. On multi-repo dev laptops another local Postgres container may already bind 5433, producing `address already in use` when starting the stack.
| Use case | Compose files | Postgres host port |
|----------|---------------|-------------------|
| Default local dev | `docker-compose.yml` | 5433:5432 |
| Integration tests (Step 11) | `docker-compose.tests.yml` only | **None** — internal compose network only |
| Perf tests / dev API without host DB (Step 15) | `docker-compose.yml` + `docker-compose.perf.yml` | **None** — overlay clears the publish |
### Perf overlay (`docker-compose.perf.yml`)
Unsets the postgres port mapping so only the API port (18980) is published to the host. Postgres remains reachable as `postgres:5432` inside the compose network (same as integration tests).
```bash
docker compose -f docker-compose.yml -f docker-compose.perf.yml up -d --build
```
File contents:
```yaml
services:
postgres:
ports: !reset []
```
Use this when Step 15 (`scripts/run-performance-tests.sh`) or manual perf probing against `https://localhost:18980` must run while another project owns host port 5433.
Integration tests do **not** use this overlay — `scripts/run-tests.sh` starts `docker-compose.tests.yml` alone, which never publishes postgres to the host.
| Mount | Container Path | Purpose |
|-------|---------------|---------|