-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
services:
influxdb3-core:
container_name: influxdb3-core
image: influxdb:3-core
ports:
- 8181:8181
command:
- influxdb3
- serve
- --node-id=${INFLUXDB_NODE_ID}
- --object-store=file
- --data-dir=/var/lib/influxdb3
volumes:
- influxdb_data:/var/lib/influxdb3
healthcheck:
test: ["CMD-SHELL", "curl -f -H 'Authorization: Bearer ${INFLUXDB_TOKEN}' http://localhost:8181/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
telegraf:
container_name: telegraf
image: telegraf
depends_on:
influxdb3-core:
condition: service_healthy
# Optionally, you can switch to depend on influxdb3-enterprise if using that
environment:
- INFLUXDB_HOST=${INFLUXDB_HOST}
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
- INFLUXDB_ORG=${INFLUXDB_ORG}
- INFLUXDB_BUCKET=${INFLUXDB_BUCKET}
- TELEGRAF_COLLECTION_INTERVAL=${TELEGRAF_COLLECTION_INTERVAL}
- HOSTNAME=telegraf
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
restart: unless-stopped
grafana:
image: grafana/grafana
ports:
- "${GRAFANA_PORT}:3000"
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
depends_on:
- influxdb3-core
# Or switch to influxdb3-enterprise as needed
restart: unless-stopped
volumes:
influxdb_data:
grafana_data: