-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
66 lines (66 loc) · 1.67 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
63
64
65
66
version: "3"
services:
collector:
container_name: collector
restart: always
build:
context: app-docker
deploy:
restart_policy:
condition: on-failure
command: python3 /usr/src/app/main.py
volumes:
- ./app-code:/usr/src/app
env_file:
- .env
depends_on:
- influxdb_cli
networks:
- webnet
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_CATALYSTCENTERBUCKET} -t ${INFLUX_TOKEN} -o ${INFLUX_ORG} --username=${INFLUX_USERNAME} --password=${INFLUX_PASSWORD} --host=http://influxdb-datasource:8086 -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
networks:
webnet: