docker-compose.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. ports:
  24. - "8080:8080"
  25. volumes:
  26. # Mount entire app directory for persistence
  27. - .:/app
  28. # Mount Docker socket for container self-restart/update
  29. - /var/run/docker.sock:/var/run/docker.sock
  30. # Mount timezone file from host for scheduling features
  31. - /etc/timezone:/etc/host-timezone:ro
  32. # Mount systemd for host shutdown capability
  33. - /run/systemd/system:/run/systemd/system:ro
  34. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
  35. - /sys/fs/cgroup:/sys/fs/cgroup:ro
  36. # Mount GPIO for DW LEDs and Desert Compass (reed switch)
  37. - /sys:/sys
  38. # Mount /dev for serial port access (devices may not exist at start time)
  39. - /dev:/dev
  40. privileged: true
  41. container_name: dune-weaver-backend