fix(infra): exclude serve-static from 'dev.sh up all' (port collision with apps) #261
+2
-2
@@ -187,9 +187,9 @@ $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 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 |
|
||||
|
||||
+21
-4
@@ -14,10 +14,23 @@ set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
COMPOSE_FILE="${SCRIPT_DIR}/dev.compose.yml"
|
||||
|
||||
# Profiles defined in dev.compose.yml. Keep in sync if a new profile
|
||||
# is added.
|
||||
# Every profile defined in dev.compose.yml, used as the teardown /
|
||||
# status / logs scope so a profile started under a custom flag is
|
||||
# always reachable later. Keep in sync if a new profile is added.
|
||||
ALL_PROFILES=(dbtools observability serve-static apps)
|
||||
|
||||
# What `up all` expands to — everything you want running for a full
|
||||
# dev session. `serve-static` is deliberately excluded:
|
||||
# - it would collide with `apps` on host port 4200 (both publish the
|
||||
# SPA there by default — Caddy serves the production build, the
|
||||
# `apps` profile runs the Angular dev-server);
|
||||
# - without a prior `nx build --configuration=production`, Caddy
|
||||
# just 404s every request, so it adds nothing to a comprehensive
|
||||
# `up all` invocation. Users who actually need it run
|
||||
# `./infra/local/dev.sh up serve-static` (and `down` still tears
|
||||
# it down because it's in ALL_PROFILES above).
|
||||
UP_ALL_PROFILES=(dbtools observability apps)
|
||||
|
||||
# Build "--profile p1 --profile p2 …" as separate arguments.
|
||||
build_all_profile_flags() {
|
||||
local p
|
||||
@@ -56,7 +69,11 @@ Commands:
|
||||
up [target...] Bring up the stack.
|
||||
Targets:
|
||||
(none) core only (postgres + redis + otel-collector)
|
||||
all core + all profiles
|
||||
all core + dbtools + observability + apps —
|
||||
the full dev stack. serve-static is
|
||||
EXCLUDED because it collides with apps
|
||||
on port 4200; run it explicitly when
|
||||
you actually want to serve a prod build.
|
||||
dbtools core + pgweb
|
||||
observability core + jaeger
|
||||
serve-static core + caddy (production-build reverse proxy)
|
||||
@@ -119,7 +136,7 @@ case "$cmd" in
|
||||
if [[ $# -eq 0 ]]; then
|
||||
dc_core up -d
|
||||
elif [[ "$1" == "all" ]]; then
|
||||
dc_all up -d
|
||||
up_with_profiles "${UP_ALL_PROFILES[@]}"
|
||||
else
|
||||
up_with_profiles "$@"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user