docker-compose.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # NetPulse server in Docker. The image contains the server with the embedded
  2. # web UI and the embedded agent binaries; nothing agent-related runs in the
  3. # container. Configuration is the same environment as the binary install
  4. # (server-go/.env.example); an optional .env file next to this compose file
  5. # is passed into the container.
  6. #
  7. # docker compose up -d --build # build from this checkout
  8. # NETPULSE_IMAGE=ghcr.io/gnacho/netpulse:latest docker compose up -d
  9. # # use a prebuilt image
  10. #
  11. # Full guide: docs/docker.md
  12. services:
  13. netpulse:
  14. image: ${NETPULSE_IMAGE:-netpulse:local}
  15. build:
  16. context: .
  17. ports:
  18. # Loopback by default: the panel must not land on a public interface
  19. # just because the compose file was used as-is. To reach it from the
  20. # LAN set NETPULSE_PUBLISH_ADDR=0.0.0.0 (or a specific host IP).
  21. - "${NETPULSE_PUBLISH_ADDR:-127.0.0.1}:${NETPULSE_PORT:-3000}:3000"
  22. volumes:
  23. - netpulse-data:/data
  24. environment:
  25. # The healthcheck and the UI live on this port inside the container;
  26. # map a different host port with NETPULSE_PORT instead of changing it.
  27. PORT: 3000
  28. DATA_DIR: /data
  29. TZ: ${TZ:-UTC}
  30. env_file:
  31. - path: .env
  32. required: false
  33. restart: unless-stopped
  34. volumes:
  35. netpulse-data: