chore(deploy): stack ports as env variables; park-lab moves to art-docker-station
Build & push images / images (push) Successful in 2m56s

art-docker-station already serves :80, so the lab stack could not come up there.
HTTP_PORT (Caddy listen), SERVER_PORT (host-net server + advertised device push
port) and VISION_HOST_PORT (vision loopback publish) now flow from the stack env
through docker-compose.prod.yml; the Caddyfile reads {$HTTP_PORT:80} and
{$SERVER_PORT:3000}. Unset = the old :80 -> :3000 / 8089 layout, so booths are
unchanged. park-lab: server = art-docker-station, ports 8080 / 3100 / 8189.

Verified: caddy validate + adapt (with env -> :8080 / 127.0.0.1:3100, without
-> :80 / :3000) and docker compose config with the lab values. Wiki:
container-deployment §proxy, fleet-deployment-komodo §park-lab, log.
This commit is contained in:
2026-10-08 11:00:04 +02:00
parent 4593a397dd
commit 08351a09bf
6 changed files with 55 additions and 6 deletions
+7
View File
@@ -121,6 +121,13 @@ prod); `ENV=dev` switches to the dev override.
internal); `/api/ws` upgrades pass through. `Caddyfile` binds `:80` so it matches ANY host — booth
IP, localhost, or `parksystems.msai.al` (pointed at the booth IP via hosts/DNS on-site). TLS later:
swap `:80` for the real hostname + uncomment Caddy `:443` → auto-HTTPS.
**Ports are stack-env variables since 2026-10-08**: `HTTP_PORT` (Caddy listen, default 80),
`SERVER_PORT` (host-net server + the advertised device push port, default 3000) and
`VISION_HOST_PORT` (vision's loopback publish, default 8089). The Caddyfile reads the first two
as `{$HTTP_PORT:80}` / `{$SERVER_PORT:3000}`, so a booth with nothing set is byte-for-byte the
old `:80 → :3000`. Introduced because the **lab stack moved onto `art-docker-station`**, a shared
host whose `:80` belongs to another service — the `park-lab` stack env sets 8080 / 3100 / 8189
([[fleet-deployment-komodo]]). Same-origin WS passes on any port (host header includes it).
- `WS_ALLOWED_ORIGINS` (env) must list any REMOTE origin admins use (same-origin always passes).
## Invariants (must hold)
+11
View File
@@ -193,6 +193,17 @@ publish.
## park-lab — the lab bench joins the fleet (2026-07-07)
> **2026-10-08 — park-lab now runs on `art-docker-station`** (`server = "art-docker-station"`,
> the same Periphery that hosts `wash-collector`), so the app can be exercised without the lab
> box. That host's `:80` is taken, so the stack env sets **`HTTP_PORT=8080`, `SERVER_PORT=3100`,
> `VISION_HOST_PORT=8189`** — three new variables honoured by `docker-compose.prod.yml` and the
> Caddyfile ([[container-deployment]] §proxy); booths leave them unset. The UI is
> `http://<station>:8080/`. Caveats of a shared host: the server still runs on the HOST network
> (it sees the station's LAN, not a device VLAN — device I/O is not testable there, only the app),
> the `parking-data` volume is per-stack (`park-lab_parking-data`), and the USB-printer
> `/dev/usb` bind still applies: if the station has no `/dev/usb`, Docker creates it as an empty
> directory on first start (harmless — the printer simply probes "offline").
Second `[[stack]]` in `komodo/resources.toml`: **`park-lab`** (server = the lab box's Periphery
`connect_as`), the first non-booth member and the proof of the tier model in practice: