mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-27 09:51:14 +00:00
[AZ-1123] Document docker-compose.perf.yml port playbook
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 |
|
||||
|-------|---------------|---------|
|
||||
|
||||
Reference in New Issue
Block a user