Files
boWave/docker-compose.dev.yml
denshooter 2ed05dee2f Fix zones loading and mock data system
Critical fixes:
- Zones now load correctly: fixed snapcast mock to emit { result: buildStatus() }
- Mock data now enabled by default: VITE_USE_MOCK=true in docker-compose.dev.yml
- Added initial status broadcast and periodic updates (5s) in snapcast mock

NMEA2000 data enhancements:
- Added realistic fuel rate monitoring (10-15 L/hr)
- Added alternator output (30-60A)
- Added engine hours counter (continuous)
- Added tank level monitoring (fresh water, waste water, bilge)
- Added depth alarm threshold
- All values use correct SI units (radians, m/s, Kelvin)
- Data changes smoothly with random walk algorithm (no jumps)
- Position advances based on heading and speed

Documentation:
- Added MOCK_DATA_EXPLANATION.md with complete guide
- Explains NMEA 2000 standard
- Documents all 3 mock data sources
- Includes troubleshooting and customization guide

Changes:
- dashboard/src/mock/snapcast.mock.js: Fixed event format and added periodic updates
- dashboard/src/mock/signalk.mock.js: Enhanced with 7 new realistic parameters
- docker-compose.dev.yml: Set VITE_USE_MOCK=true for dev mode
- MOCK_DATA_EXPLANATION.md: New comprehensive documentation

Now zones load on app startup and all mock data is realistic and working!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 14:07:30 +01:00

56 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Development override real services, no hardware needed.
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# Mac audio output: make mac-audio
# Spotify Connect: make spotify
services:
signalk:
environment:
- SIGNALK_DEMO=true # Built-in demo NMEA data generator
# Librespot: stub in dev (pipe backend doesn't cross VM boundary).
# For real Spotify on Mac run: make spotify
librespot:
build:
context: ./docker/librespot
dockerfile: Dockerfile.dev
entrypoint: []
command: ["sh", "-c", "echo 'librespot stub: run make spotify for Mac audio' && sleep infinity"]
restart: "no"
volumes: []
ports: []
# Zones: real snapclient containers with null player (v0.35+, URI format)
zone-salon:
command: ["--hostID", "zone-salon", "--player", "file:filename=null", "tcp://snapserver"]
zone-cockpit:
command: ["--hostID", "zone-cockpit", "--player", "file:filename=null", "tcp://snapserver"]
zone-bug:
command: ["--hostID", "zone-bug", "--player", "file:filename=null", "tcp://snapserver"]
zone-heck:
command: ["--hostID", "zone-heck", "--player", "file:filename=null", "tcp://snapserver"]
# Vite dev server with HMR — uses Dockerfile.dev to avoid overwriting node:20-alpine
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile.dev
entrypoint: []
working_dir: /app
volumes:
- ./dashboard:/app
- /app/node_modules
command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 8090"]
ports:
- "8090:8090"
environment:
- VITE_SNAPCAST_HOST=localhost
- VITE_SIGNALK_HOST=localhost
- VITE_MOPIDY_HOST=localhost
- VITE_JELLYFIN_HOST=localhost
- VITE_USE_MOCK=true # Use mock data for dev testing (real APIs when false)