# Self-contained InfluxDB v2 + Grafana stack for the omni_pca # integration. Pre-provisioned with the InfluxDB datasource and the # "Omni Pro II — Panel Overview" dashboard. # # Usage: # cp .env.example .env && edit the secrets && docker compose up -d # open http://localhost:3000 (admin / $GRAFANA_PASSWORD) # # Then paste the contents of ha-snippet.yaml into your HA # configuration.yaml (and add `influxdb_token: $INFLUX_TOKEN` to # secrets.yaml). Restart HA. Within 30s the dashboard's panels start # filling in. services: influxdb: image: influxdb:2.7-alpine container_name: omni-pca-influxdb restart: unless-stopped environment: DOCKER_INFLUXDB_INIT_MODE: setup DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUX_USERNAME:-admin} DOCKER_INFLUXDB_INIT_PASSWORD: ${INFLUX_PASSWORD} DOCKER_INFLUXDB_INIT_ORG: omni-pca DOCKER_INFLUXDB_INIT_BUCKET: ha DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: ${INFLUX_TOKEN} DOCKER_INFLUXDB_INIT_RETENTION: 30d volumes: - influxdb-data:/var/lib/influxdb2 - influxdb-config:/etc/influxdb2 ports: - "8086:8086" healthcheck: test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8086/health"] interval: 10s timeout: 3s retries: 5 start_period: 10s grafana: image: grafana/grafana:11.4.0 container_name: omni-pca-grafana restart: unless-stopped depends_on: influxdb: condition: service_healthy environment: GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD} GF_AUTH_ANONYMOUS_ENABLED: "false" GF_USERS_ALLOW_SIGN_UP: "false" GF_LOG_LEVEL: warn # Consumed by ./provisioning/datasources/influxdb.yml INFLUX_URL: http://influxdb:8086 INFLUX_TOKEN: ${INFLUX_TOKEN} volumes: - grafana-data:/var/lib/grafana - ./provisioning:/etc/grafana/provisioning:ro ports: - "3000:3000" healthcheck: test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3000/api/health || exit 1"] interval: 10s timeout: 3s retries: 5 start_period: 15s volumes: influxdb-data: influxdb-config: grafana-data: