1
0

docker-compose.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. services:
  2. frontend:
  3. build:
  4. context: ./frontend
  5. dockerfile: Dockerfile
  6. image: ghcr.io/tuanchris/dune-weaver-frontend:${IMAGE_TAG:-main}
  7. restart: always
  8. ports:
  9. - "${FRONTEND_PORT:-80}:80"
  10. volumes:
  11. - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
  12. depends_on:
  13. - backend
  14. container_name: dune-weaver-frontend
  15. backend:
  16. build: .
  17. image: ghcr.io/tuanchris/dune-weaver:${IMAGE_TAG:-main}
  18. restart: always
  19. # Pin motion-critical backend to cores 0-2 (Raspberry Pi 4/5 has cores 0-3)
  20. # This prevents CPU contention from touch app blocking I/O calls
  21. cpuset: "0,1,2"
  22. ports:
  23. - "8080:8080"
  24. # Environment variables for testing (uncomment to enable):
  25. # environment:
  26. # FORCE_UPDATE_AVAILABLE: "1" # Always show update available
  27. # FAKE_LATEST_VERSION: "99.0.0" # Fake a newer version
  28. volumes:
  29. # Mount entire app directory for persistence
  30. - .:/app
  31. # Mount Docker socket for container self-restart/update
  32. - /var/run/docker.sock:/var/run/docker.sock
  33. # Mount timezone file from host for scheduling features
  34. - /etc/timezone:/etc/host-timezone:ro
  35. # Mount hostname for WiFi module to report host identity
  36. - /etc/hostname:/etc/host-hostname:ro
  37. # Mount systemd for host shutdown capability
  38. - /run/systemd/system:/run/systemd/system:ro
  39. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  40. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  41. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  42. - /sys:/sys
  43. # Mount /dev for serial port access (devices may not exist at start time)
  44. - /dev:/dev
  45. privileged: true
  46. container_name: dune-weaver-backend