Files
EVOLV/docker-compose.yml
Rene De Ren 0cab98c196
Some checks failed
CI / lint-and-test (push) Has been cancelled
Pumping-station demo overhaul + cross-node test harness + bumps
Submodule bumps land the deadlock fix (state.js residue unpark + MGC
optimalControl dispatch reorder) and pumpingStation stopLevel hysteresis.

- Renames examples/pumpingstation-3pumps-dashboard →
  pumpingstation-complete-example with regenerated flow.json. New
  dashboard groups, demand-broadcast wiring, S88 placement rule
  applied, ui-chart trend-split and link-channel naming follow
  .claude/rules/node-red-flow-layout.md.
- New cross-node test harness under test/: end-to-end-pumpingstation
  drives PS + MGC + 3 pumps + physics simulator end-to-end and
  verifies the ~5/15 min cycle.
- Adds Grafana provisioning dashboards (pumping-station.json) and a
  helper sync-example.sh script for export/import to live Node-RED.
- Docker entrypoint + settings + compose tweaks for the persistent
  user dir layout used by the demo.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 11:21:21 +02:00

96 lines
2.8 KiB
YAML

########################################
# EVOLV — Docker Compose Dev Stack
########################################
services:
nodered:
build:
context: .
dockerfile: Dockerfile
container_name: evolv-nodered
restart: unless-stopped
ports:
- "1880:1880"
volumes:
# Bind mount: host edits are instantly visible in container
- .:/data/evolv:cached
# Named volume: overlay node_modules so host doesn't need native deps
- evolv_node_modules:/data/evolv/node_modules
# Persistent Node-RED user dir: flows/projects/sessions survive
# container recreation. Without this, `docker compose down && up`
# wipes the active flow and the entrypoint reseeds demo-flow.json.
- nodered_data:/data
environment:
- TZ=Europe/Amsterdam
- LOCATION_ID=docker-dev
- NODE_ENV=development
- INFLUXDB_URL=http://influxdb:8086
- INFLUXDB_TOKEN=evolv-dev-token
- INFLUXDB_ORG=evolv
- INFLUXDB_BUCKET=telemetry
depends_on:
influxdb:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:1880/nodes"]
interval: 15s
timeout: 5s
start_period: 30s
retries: 3
# ---------------------------------------------------------
# InfluxDB — time-series telemetry backend
# ---------------------------------------------------------
influxdb:
image: influxdb:2.7
container_name: evolv-influxdb
restart: unless-stopped
ports:
- "8086:8086"
volumes:
- influxdb_data:/var/lib/influxdb2
environment:
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=evolv
- DOCKER_INFLUXDB_INIT_PASSWORD=evolv-dev-pw
- DOCKER_INFLUXDB_INIT_ORG=evolv
- DOCKER_INFLUXDB_INIT_BUCKET=telemetry
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=evolv-dev-token
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8086/health"]
interval: 10s
timeout: 5s
start_period: 15s
retries: 3
# ---------------------------------------------------------
# Grafana — dashboard visualization
# ---------------------------------------------------------
grafana:
image: grafana/grafana:latest
container_name: evolv-grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- grafana_data:/var/lib/grafana
- ./docker/grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=evolv
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
depends_on:
influxdb:
condition: service_healthy
volumes:
evolv_node_modules:
driver: local
nodered_data:
driver: local
influxdb_data:
driver: local
grafana_data:
driver: local