fix(infra): exclude serve-static from 'dev.sh up all' (port collision with apps)
dev.sh up all failed at startup with 'port 4200 already allocated': both the apps profile (portal-shell dev-server, ADR-0030) and the serve-static profile (Caddy reverse proxy) publish 4200 by default. Split ALL_PROFILES (teardown / status / logs scope, unchanged) from a new UP_ALL_PROFILES (what 'up all' expands to). serve-static drops out of up all because: - it collides with apps on 4200, and - it has zero value without a prior nx build --configuration=production (otherwise Caddy 404s every request). serve-static stays explicit: ./infra/local/dev.sh up serve-static. Teardown still catches it via ALL_PROFILES. Usage text + infra/README.md cheat-sheet updated. The script is environment-agnostic — works the same on local and on vm-dev. No local-vs-vm mode needed.
This commit is contained in:
+14
-14
@@ -186,20 +186,20 @@ $EDITOR infra/local/.env
|
||||
|
||||
Run `./infra/local/dev.sh help` for the full reference. Cheat-sheet:
|
||||
|
||||
| Command | Effect |
|
||||
| ------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
||||
| `./infra/local/dev.sh up` | Core only (postgres + redis + otel-collector) |
|
||||
| `./infra/local/dev.sh up all` | Core + every profile |
|
||||
| `./infra/local/dev.sh up dbtools` | Core + pgweb |
|
||||
| `./infra/local/dev.sh up observability` | Core + Jaeger |
|
||||
| `./infra/local/dev.sh up serve-static` | Core + Caddy serving `dist/.../browser/` per ADR-0019 |
|
||||
| `./infra/local/dev.sh up apps` | Core + the three Nx dev servers in Docker (ADR-0030) |
|
||||
| `./infra/local/dev.sh down` | Tear down the whole stack (every profile in scope) |
|
||||
| `./infra/local/dev.sh down -v` | Tear down + wipe named volumes (incl. audit-roles bootstrap) |
|
||||
| `./infra/local/dev.sh stop pgweb` | Stop one service (containers stay around) |
|
||||
| `./infra/local/dev.sh status` | `docker compose ps`, with every profile visible |
|
||||
| `./infra/local/dev.sh logs otel-collector` | Follow logs |
|
||||
| `./infra/local/dev.sh exec postgres psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"` | Run a command inside a service |
|
||||
| Command | Effect |
|
||||
| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `./infra/local/dev.sh up` | Core only (postgres + redis + otel-collector) |
|
||||
| `./infra/local/dev.sh up all` | Core + dbtools + observability + apps (full dev stack). serve-static is excluded — it would collide with apps on port 4200 |
|
||||
| `./infra/local/dev.sh up dbtools` | Core + pgweb |
|
||||
| `./infra/local/dev.sh up observability` | Core + Jaeger |
|
||||
| `./infra/local/dev.sh up serve-static` | Core + Caddy serving `dist/.../browser/` per ADR-0019 |
|
||||
| `./infra/local/dev.sh up apps` | Core + the three Nx dev servers in Docker (ADR-0030) |
|
||||
| `./infra/local/dev.sh down` | Tear down the whole stack (every profile in scope) |
|
||||
| `./infra/local/dev.sh down -v` | Tear down + wipe named volumes (incl. audit-roles bootstrap) |
|
||||
| `./infra/local/dev.sh stop pgweb` | Stop one service (containers stay around) |
|
||||
| `./infra/local/dev.sh status` | `docker compose ps`, with every profile visible |
|
||||
| `./infra/local/dev.sh logs otel-collector` | Follow logs |
|
||||
| `./infra/local/dev.sh exec postgres psql -U "$POSTGRES_USER" -d "$POSTGRES_DB"` | Run a command inside a service |
|
||||
|
||||
Anything not matching one of the named verbs is passed through to `docker compose -f dev.compose.yml ...` (with every profile flagged in), so you keep the full Compose surface available — `./dev.sh config`, `./dev.sh top`, `./dev.sh inspect …`, etc.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user