Some checks failed
Holocron Frontend CI / lint-and-test (push) Has been cancelled
K8s is the production target — docker compose is local-only. Collapse the three compose files (docker-compose.yml, .local.yml, .local-dev.yml) into a single docker-compose.yml driven by profiles: local → full stack in containers dev → backing services only; frontend on host (npm run start:dev) demo → synthetic MQTT publisher (composable with local or dev) Make targets: make up → --profile local --profile demo make up-dev → --profile dev --profile demo make up-bare → --profile local (no synthetic data) All values (MQTT_TOPIC_PREFIX, MAPTILER_KEY, KEYCLOAK_*, host port mappings) are env-driven with sensible local defaults. The same env contract is what the K8s ConfigMap will inject in production. Also: - Bump frontend Dockerfile (local/dev) from node:18 → node:20-alpine. Vite 7 requires crypto.hash (Node 20.12+). Also bumps the test-publisher base image to node:20-alpine. - Default host MQTT port moved to 1885 and frontend to 3002 (compose env defaults) to avoid common conflicts; both overridable via .env. Verified: - docker compose --profile local --profile demo config parses OK - docker compose --profile dev --profile demo config parses OK - `make up` brings up 6 healthy containers - curl localhost:7070/health → 200 - curl localhost:3002 → 200 - Test publisher streams UAV/SHIP/HELO/TANK positions on r2d2/holocron/... - Browser screenshot confirms Cesium map rendering with live MQTT assets Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
1.7 KiB
Bash
36 lines
1.7 KiB
Bash
# Copy to .env and set your values. Do not commit .env.
|
|
#
|
|
# This same env contract is used by the K8s production deployment.
|
|
# Production values come from a ConfigMap/Secret in the cluster; local values
|
|
# come from this file.
|
|
|
|
# ─── MQTT topic prefix ──────────────────────────────────────────────
|
|
# Local default: r2d2/holocron
|
|
# Production: set per environment (e.g. r2d2-prod/holocron, nato/holocron/...)
|
|
MQTT_TOPIC_PREFIX=r2d2/holocron
|
|
|
|
# ─── Map tiles ──────────────────────────────────────────────────────
|
|
# Get a free key at https://maptiler.com
|
|
MAPTILER_KEY=
|
|
|
|
# ─── Host port mappings (local docker compose only) ─────────────────
|
|
# Override if these conflict with other services on your machine.
|
|
PROXY_PORT=7070
|
|
FRONTEND_PORT=3002
|
|
WS_PORT=9002
|
|
MQTT_PORT=1885
|
|
MQTT_WS_PORT=9001
|
|
|
|
# ─── Keycloak ───────────────────────────────────────────────────────
|
|
# Local defaults are fine; production overrides via Secret.
|
|
KEYCLOAK_DB_NAME=keycloak_db
|
|
KEYCLOAK_DB_USER=keycloakuser
|
|
KEYCLOAK_DB_PASSWORD=keycloakuser
|
|
KEYCLOAK_ADMIN=adminkeycloak
|
|
KEYCLOAK_ADMIN_PASSWORD=adminkeycloak
|
|
|
|
# ─── Production-only (set in K8s ConfigMap, not here) ───────────────
|
|
# CORS_ORIGIN=https://app.example.com,https://other.example.com
|
|
# WS_PUBLIC_URL=wss://app.example.com/ws
|
|
# MAX_MESSAGE_BYTES=524288
|
|
# WS_ALLOWED_TOPIC_PREFIX=assets/status/
|