-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
54 lines (50 loc) · 1.44 KB
/
docker-compose.yml
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
# Copyright 2025 InfluxData
# Author: Suyash Joshi ([email protected])
services:
influxdb:
image: quay.io/influxdb/influxdb3-core:latest
command: serve --node-id=${INFLUXDB_NODE_ID} --object-store=file --data-dir=/var/lib/influxdb3
ports:
- "${INFLUXDB_HTTP_PORT}:8181"
volumes:
- influxdb_data:/var/lib/influxdb3
- ./influxdb/config:/etc/influxdb3
environment:
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
- INFLUXDB_ORG=${INFLUXDB_ORG}
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8181/health" ]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
telegraf:
build:
context: ./telegraf
dockerfile: Dockerfile
depends_on:
influxdb:
condition: service_healthy
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
restart: unless-stopped
grafana:
image: grafana/grafana:latest
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:
- influxdb
restart: unless-stopped
volumes:
influxdb_data:
grafana_data: