forked from Kludex/fastapi-prometheus-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
52 lines (48 loc) · 1.05 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
version: "3.8"
services:
app:
build: .
restart: unless-stopped
container_name: app
ports:
- 8000:8000
networks:
example-network:
ipv4_address: 172.16.238.10
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
container_name: prometheus
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
networks:
example-network:
ipv4_address: 172.16.238.11
grafana:
image: grafana/grafana:latest
restart: unless-stopped
user: "472"
container_name: grafana
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- ./datasource.yml:/etc/grafana/provisioning/datasource.yml
env_file:
- ./config.monitoring
networks:
example-network:
ipv4_address: 172.16.238.12
networks:
example-network:
name: example-network
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24