-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yaml
43 lines (41 loc) · 914 Bytes
/
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
services:
web:
container_name: metrics-accumulator
build:
dockerfile: compose-example/Dockerfile
ports:
- "8080:8080"
environment:
PORT: 8080
networks:
- private-network
healthcheck:
test: [ "CMD", "wget", "-O", "-", "http://localhost:8080" ]
interval: 20s
timeout: 2s
retries: 5
prometheus:
container_name: prometheus-server
image: "prom/prometheus:v2.52.0"
ports:
- "9090:9090"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
volumes:
- prometheus:/etc/prometheus
networks:
- private-network
depends_on:
web:
condition: service_healthy
volumes:
prometheus:
driver: local
driver_opts:
o: bind
type: none
device: ./compose-example/prometheus
networks:
private-network:
driver: bridge