1
0

docker-compose.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # TODO: Revert image tags from feature-react-ui to main before merging to main branch
  2. services:
  3. frontend:
  4. build:
  5. context: ./frontend
  6. dockerfile: Dockerfile
  7. image: ghcr.io/tuanchris/dune-weaver-frontend:feature-react-ui
  8. restart: always
  9. cap_add:
  10. - SYS_NICE # Enable real-time thread priority for smooth UART communication
  11. # ports:
  12. # - "8080:8080" # Map port 8080 of the container to 8080 of the host (access via http://localhost:8080)
  13. network_mode: "host" # Use host network for device access
  14. volumes:
  15. - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
  16. depends_on:
  17. - backend
  18. container_name: dune-weaver-frontend
  19. backend:
  20. build: .
  21. image: ghcr.io/tuanchris/dune-weaver:feature-react-ui
  22. restart: always
  23. # Pin motion-critical backend to cores 0-2 (Raspberry Pi 4/5 has cores 0-3)
  24. # This prevents CPU contention from touch app blocking I/O calls
  25. cpuset: "0,1,2"
  26. ports:
  27. - "8080:8080"
  28. # Environment variables for testing (uncomment to enable):
  29. # environment:
  30. # FORCE_UPDATE_AVAILABLE: "1" # Always show update available
  31. # FAKE_LATEST_VERSION: "99.0.0" # Fake a newer version
  32. volumes:
  33. # Mount entire app directory for persistence
  34. - .:/app
  35. # Mount Docker socket for container self-restart/update
  36. - /var/run/docker.sock:/var/run/docker.sock
  37. # Mount timezone file from host for scheduling features
  38. - /etc/timezone:/etc/host-timezone:ro
  39. # Mount systemd for host shutdown capability
  40. - /run/systemd/system:/run/systemd/system:ro
  41. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  42. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  43. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  44. - /sys:/sys
  45. # Mount /dev for serial port access (devices may not exist at start time)
  46. - /dev:/dev
  47. privileged: true
  48. container_name: dune-weaver-backend