Files
butler-sos/docs/docker-compose/docker-compose_fullstack_influxdb_v2.yml
2025-12-12 17:24:12 +01:00

60 lines
2.0 KiB
YAML

# docker-compose_fullstack_influxdb_v2.yml
services:
butler-sos:
image: ptarmiganlabs/butler-sos:latest
container_name: butler-sos
restart: unless-stopped
ports:
- "9997:9997" # UDP user events
- "9996:9996" # UDP log events
- "9842:9842" # Prometheus metrics
- "3100:3100" # Config file visualization
volumes:
# Make config file and log files accessible outside of container
- "./config:/nodeapp/config"
- "./log:/nodeapp/log"
command: ["node", "src/butler-sos.js", "-c", "/nodeapp/config/production_influxdb_v2.yaml"]
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "5m"
networks:
- senseops
influxdb:
image: influxdb:2.7-alpine
container_name: influxdb-v2
restart: unless-stopped
volumes:
- ./influxdb/data:/var/lib/influxdb2 # Mount for influxdb data directory
- ./influxdb/config/:/etc/influxdb2/ # Mount for influxdb configuration
ports:
# The API for InfluxDB is served on port 8086
- "8086:8086"
environment:
# Initial setup parameters
- "DOCKER_INFLUXDB_INIT_MODE=setup"
- "DOCKER_INFLUXDB_INIT_USERNAME=admin"
- "DOCKER_INFLUXDB_INIT_PASSWORD=butlersos123"
- "DOCKER_INFLUXDB_INIT_ORG=butler-sos"
- "DOCKER_INFLUXDB_INIT_BUCKET=butler-sos"
- "DOCKER_INFLUXDB_INIT_RETENTION=10d"
- "DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=butlersos-token"
networks:
- senseops
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- ./grafana/data:/var/lib/grafana
networks:
- senseops
networks:
senseops:
driver: bridge