services: api: build: ./apps/api container_name: homelab-monitor-api restart: unless-stopped env_file: .env environment: - HOSTS_CONFIG_PATH=/app/config/hosts.yaml - DB_PATH=/app/data/monitor.db - SSH_PRIVATE_KEY_PATH=/app/ssh/monitor_ed25519 - DISCOVERY_FILE_PATH=/app/data/devices-raw.json volumes: - ./config/hosts.yaml:/app/config/hosts.yaml:ro - ./ssh/monitor_ed25519:/app/ssh/monitor_ed25519:ro # Bind mount (not a named volume) so scripts/discover-devices.sh, which # runs on the host via systemd (see deploy/systemd/), can write # devices-raw.json into the same place the container reads it from. - ./data:/app/data networks: - web web: build: ./apps/web container_name: homelab-monitor-web restart: unless-stopped ports: - "8090:80" depends_on: - api networks: - web networks: web: