-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (86 loc) · 1.72 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3"
services:
redis:
image: "redis:alpine"
ports:
- "6379:6379"
web1:
restart: on-failure
links:
- my_service_db
environment:
- dev=1
- db_service_name=my_service_db
- db_name=example_db
- db_retry_time=3000
build:
context: ./web1
dockerfile: Dockerfile
ports:
- "81:5000"
depends_on:
- redis
- my_service_db
web2:
restart: on-failure
links:
- my_service_db
environment:
- dev=1
- db_service_name=my_service_db
- db_name=example_db
- db_retry_time=3000
build:
context: ./web2
dockerfile: Dockerfile
ports:
- "82:5000"
depends_on:
- redis
- my_service_db
my_service_db:
container_name: my_service_db
image: mongo
volumes:
- ./db:/data/db
ports:
- "27017:27017"
nginx:
build: ./nginx
ports:
- "80:80"
depends_on:
- web1
- web2
influxdb:
image: influxdb:2.1.1
volumes:
- influxdb-storage:/var/lib/influxdb2:rw
env_file:
- .env
entrypoint: ["./entrypoint.sh"]
restart: on-failure:10
ports:
- ${DOCKER_INFLUXDB_INIT_PORT}:8086
telegraf:
image: telegraf:1.19
volumes:
- ${TELEGRAF_CFG_PATH}:/etc/telegraf/telegraf.conf:rw
env_file:
- .env
depends_on:
- influxdb
grafana:
image: grafana/grafana-oss:8.4.3
volumes:
- grafana-storage:/var/lib/grafana:rw
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/dashboards/:/var/lib/grafana/dashboards/
depends_on:
- influxdb
ports:
- ${GRAFANA_PORT}:3000
volumes:
grafana-storage:
influxdb-storage:
mongo_data: