| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- services:
- frontend:
- build:
- context: ./frontend
- dockerfile: Dockerfile
- image: ghcr.io/tuanchris/dune-weaver-frontend:main
- restart: always
- cap_add:
- - SYS_NICE # Enable real-time thread priority for smooth UART communication
- # ports:
- # - "8080:8080" # Map port 8080 of the container to 8080 of the host (access via http://localhost:8080)
- network_mode: "host" # Use host network for device access
- volumes:
- - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- depends_on:
- - backend
- container_name: dune-weaver-frontend
- backend:
- build: .
- image: ghcr.io/tuanchris/dune-weaver:main
- restart: always
- # Pin motion-critical backend to cores 0-2 (Raspberry Pi 4/5 has cores 0-3)
- # This prevents CPU contention from touch app blocking I/O calls
- cpuset: "0,1,2"
- ports:
- - "8080:8080"
- # Environment variables for testing (uncomment to enable):
- # environment:
- # FORCE_UPDATE_AVAILABLE: "1" # Always show update available
- # FAKE_LATEST_VERSION: "99.0.0" # Fake a newer version
- volumes:
- # Mount entire app directory for persistence
- - .:/app
- # Mount Docker socket for container self-restart/update
- - /var/run/docker.sock:/var/run/docker.sock
- # Mount timezone file from host for scheduling features
- - /etc/timezone:/etc/host-timezone:ro
- # Mount systemd for host shutdown capability
- - /run/systemd/system:/run/systemd/system:ro
- - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
- - /sys/fs/cgroup:/sys/fs/cgroup:ro
- # Mount GPIO for DW LEDs and Desert Compass (reed switch)
- - /sys:/sys
- # Mount /dev for serial port access (devices may not exist at start time)
- - /dev:/dev
- privileged: true
- container_name: dune-weaver-backend
|