-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
187 lines (175 loc) · 4.61 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
version: '3.7'
services:
prometheus:
image: prom/prometheus:v2.48.1
hostname: prometheus
container_name: prometheus
volumes:
- ./prometheus/configuration:/etc/prometheus/
- prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9090" ]
interval: 10s
timeout: 10s
retries: 3
start_period: 1m
ports:
- 9090:9090
- 8428
networks:
- acme_private_network
depends_on:
- cadvisor
node-exporter:
image: prom/node-exporter:v1.7.0
hostname: node-exporter
container_name: node-exporter
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
ports:
- 9100:9100
networks:
- acme_private_network
grafana:
image: grafana/grafana:10.2.3
hostname: grafana
container_name: grafana
#user: "$UID:$GID" # Important.
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./grafana/data:/var/lib/grafana
- ./grafana/configuration/dashboards:/etc/grafana/provisioning/dashboards
- ./grafana/configuration/datasources:/etc/grafana/provisioning/datasources
env_file:
- ./grafana/configuration/parameters.env
networks:
- acme_private_network
ghost:
build:
dockerfile: Dockerfile
context: ./docker/webserver/
hostname: ghost_server
container_name: ghost_server
restart: always
command: "consul agent -config-dir /consul/config/client.json"
depends_on:
- db
volumes:
- ./ghost/configuration:/var/lib/ghost/content
- ./consul/consul-client-ghost-config.json:/consul/config/client.json:ro
ports:
- 80:2368
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:2368" ]
interval: 10s
timeout: 10s
retries: 3
start_period: 1m
networks:
- acme_private_network
environment:
database__client: mysql
database__connection__host: db
database__connection__user: root
database__connection__password: password
database__connection__database: ghost
url: http://localhost
db:
image: mysql:8
hostname: ghost_database
container_name: ghost_database
restart: always
volumes:
- ./ghost/data:/var/lib/mysql
ports:
- 3306:3306
networks:
- acme_private_network
environment:
MYSQL_ROOT_PASSWORD: password
weavescope:
image: weaveworks/scope:latest
container_name: weavescope
hostname: weavescope
pid: "host"
privileged: true
networks:
- acme_private_network
ports:
- "4040:4040"
labels:
- "works.weave.role=system"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
command:
- "--probe.docker=true"
- "--weave=false"
cadvisor:
image: google/cadvisor
hostname: cadvisor
container_name: cadvisor
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
consul-server-1:
image: hashicorp/consul:1.17
container_name: consul-server-1
restart: always
volumes:
- ./consul/consul-server-1-config.json:/consul/config/server.json:ro
networks:
- acme_private_network
ports:
- "8501:8500"
- "8601:8600/tcp"
- "8601:8600/udp"
command: "agent"
consul-server-2:
image: hashicorp/consul:1.17
container_name: consul-server-2
restart: always
volumes:
- ./consul/consul-server-2-config.json:/consul/config/server.json:ro
networks:
- acme_private_network
ports:
- "8502:8500"
- "8602:8600/tcp"
- "8602:8600/udp"
command: "agent"
consul-server-3:
image: hashicorp/consul:1.17
container_name: consul-server-3
restart: always
volumes:
- ./consul/consul-server-3-config.json:/consul/config/server.json:ro
networks:
- acme_private_network
ports:
- "8503:8500"
- "8603:8600/tcp"
- "8603:8600/udp"
command: "agent"
volumes:
prometheus: {}
networks:
acme_private_network: