# The hub (web UI + API). install.sh sets this up on a server (see README); by hand it is: # clone into /opt/network-monitor, write .env from .env.example, docker compose up -d --build # Deploys after that: docker exec network-monitor update name: network-monitor services: app: build: context: . dockerfile: container/Dockerfile image: network-monitor:latest container_name: network-monitor restart: unless-stopped environment: ROLE: hub CONTAINER_NAME: network-monitor # Only a reverse proxy at these addresses may set X-Forwarded-For. FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-127.0.0.1} # Probes on other machines report here, so .env sets HOST_BIND=0.0.0.0 (LAN). Use # HOST_BIND=127.0.0.1 behind a reverse proxy. ports: - "${HOST_BIND:-127.0.0.1}:${HOST_PORT:-8000}:8000" volumes: - runtime:/srv # source checkout, venv, update state - data:/data # the app's persistent data # Repo URL, credentials and app settings, read on every start and every update. # Not env_file: a mounted file can change without recreating the container. - ./.env:/run/config/app.env:ro read_only: true tmpfs: - /tmp cap_drop: [ALL] security_opt: - no-new-privileges:true mem_limit: 256m logging: driver: json-file options: max-size: 10m max-file: "3" volumes: runtime: data: