-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
executable file
·62 lines (62 loc) · 1.58 KB
/
docker-compose.yaml
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
57
58
59
60
61
62
version: "3"
services:
grafana:
container_name: ${GRAFANA_HOST}
restart: always
image: grafana/grafana
deploy:
restart_policy:
condition: on-failure
ports:
- "${GRAFANA_PORT}:${GRAFANA_PORT}"
user: "0"
env_file:
- .env
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
networks:
- webnet
influxdb:
container_name: ${INFLUX_HOST}
restart: always
image: influxdb
deploy:
restart_policy:
condition: on-failure
ports:
- ${INFLUX_PORT}:${INFLUX_PORT}
volumes:
- ./influxdb/:/root/.influxdbv2
env_file:
- .env
networks:
- webnet
influxdb_cli:
# Use the influx cli to set up an influxdb instance.
container_name: influxdb_cli
links:
- influxdb
image: influxdb
entrypoint: influx setup --bucket ${INFLUX_BUCKET} -t ${INFLUX_TOKEN} -o ${INFLUX_ORG} --username=${INFLUX_USERNAME} --password=${INFLUX_PASSWORD} --host=http://${INFLUX_HOST}:${INFLUX_PORT} -f
# Wait for the influxd service in the influxdb container has fully bootstrapped before trying to setup an influxdb instance with the influxdb_cli service.
restart: on-failure:10
depends_on:
- influxdb
networks:
- webnet
telegraf:
container_name: telegraf-mdt
image: telegraf
volumes:
- ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:rw
ports:
- "57000:57000"
env_file:
- .env
depends_on:
- influxdb
networks:
- webnet
networks:
webnet: