1
0

docker-compose.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. services:
  2. frontend:
  3. build:
  4. context: ./frontend
  5. dockerfile: Dockerfile
  6. image: ghcr.io/tuanchris/dune-weaver-frontend: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: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 systemd for host shutdown capability
  36. - /run/systemd/system:/run/systemd/system:ro
  37. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  38. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  39. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  40. - /sys:/sys
  41. # Mount /dev for serial port access (devices may not exist at start time)
  42. - /dev:/dev
  43. privileged: true
  44. container_name: dune-weaver-backend