- compose.yaml: new spa service. Image trm/spa:${SPA_TAG:-main}.
expose: 80 (internal-only; reverse proxy fronts it). Read-only
volume mount ${SPA_CONFIG_FILE:-./spa-config.json} ->
/usr/share/nginx/html/config.json for the runtime-config override.
Healthcheck via wget against localhost.
- spa-config.example.json: dev-default-equivalent file with env=stage.
Operators copy to spa-config.json and edit per environment.
- .gitignore: spa-config.json never committed (per-environment).
- .env.example: new spa section documenting SPA_TAG and
SPA_CONFIG_FILE; reframes the directus internal-only note as a
shared design (SPA also internal-only).
- README.md:
- Services in the stack: SPA moved from Planned to Currently.
- Step 8 in first-deploy checklist: "Verify the SPA loads".
- Network model: spell out the four routes the proxy must wire
(/api, /ws-business, /ws-live, default -> SPA). Same-origin
non-negotiable callout.
- New "Runtime config override (SPA)" section: copy/edit/mount
workflow + when not to use absolute URLs.
postgres service uses timescale/timescaledb-ha:pg16.6-ts2.17.2-all,
which bundles TimescaleDB and PostGIS (and others) ready for CREATE
EXTENSION. This avoids a future DB image swap when Phase 2 of processor
needs PostGIS for the geofence engine. Pinned to a specific tag for
reproducibility; the Docker Hub URL for verification is in the comment.
Data directory mount path is /home/postgres/pgdata/data (the ha-image
layout, different from the stock postgres image's /var/lib/...).
Internal-only — no host port mapping. POSTGRES_USER/PASSWORD/DB env
vars retained as the credential mechanism; if the ha-image rejects
them, fix the env-var scheme without changing the rest of the layout.
processor service references git.dev.microservices.al/trm/processor:
${PROCESSOR_TAG:-main}, depends on Redis + Postgres healthy, takes its
POSTGRES_URL from the same credential vars Postgres bootstraps with.
.env.example documents the new POSTGRES_*, PROCESSOR_TAG, and
PROCESSOR_INSTANCE_ID variables. Important: POSTGRES_PASSWORD only
applies on first boot; rotate via ALTER USER inside psql afterwards.
Initial pilot stack: redis + tcp-ingestion. Designed to grow as the
platform's other services land (processor, postgres+timescale, directus,
react-spa).
- compose.yaml: services as image: references with env-var-driven tags
and ports. Redis is internal-only (no host port). TCP port 5027
exposed for GPS device traffic. Persisted Redis volume.
- .env.example: documents TCP_INGESTION_TAG, INSTANCE_ID, PORT, LOG_LEVEL.
Compose has defaults so the stack starts with no env config.
- README: Portainer Repository Stack instructions, manual deploy fallback,
network model, planned-services list, why-separate-repo rationale.
- .gitignore: ignore .env