feat: Add Docker-based preview deployments for phase review

Preview deployments let reviewers spin up the app at a specific branch
in local Docker containers, accessible through a single Caddy reverse
proxy port. Docker is the source of truth — no database table needed.

New module: src/preview/ with config discovery (.cw-preview.yml →
compose → Dockerfile fallback), compose generation, Docker CLI wrapper,
health checking, and port allocation (9100-9200 range).
This commit is contained in:
Lukas May
2026-02-10 13:24:56 +01:00
parent 783a07bfb7
commit 270a5cb21d
31 changed files with 2243 additions and 22 deletions

View File

@@ -99,6 +99,14 @@ Uses **Commander.js** for command parsing.
| `list` | List projects |
| `delete <id>` | Delete project |
### Preview Deployments (`cw preview`)
| Command | Description |
|---------|-------------|
| `start --initiative <id> --project <id> --branch <branch> [--phase <id>]` | Start Docker preview |
| `stop <previewId>` | Stop and clean up preview |
| `list [--initiative <id>]` | List active previews |
| `status <previewId>` | Get preview status with service details |
### Accounts (`cw account`)
| Command | Description |
|---------|-------------|