-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (41 loc) 路 943 Bytes
/
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
version: '3'
# Define a specific network for this docker compose stack (Flask Web App + Prometheus + Grafana)
networks:
prometheus_network:
services:
# Prometheus Server
prometheus:
image: prom/prometheus
volumes:
- ./prometheus-configs:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/webapp.yml'
ports:
- 9090:9090
networks:
- prometheus_network
restart: unless-stopped
# Demo Flask web App
webapp:
build:
context: ./webapp
ports:
- 8887:8887
networks:
- prometheus_network
restart: unless-stopped
# Grafana
grafana:
image: grafana/grafana
depends_on:
- prometheus
ports:
- 3000:3000
environment:
GF_SECURITY_ADMIN_USER: grafana
GF_SECURITY_ADMIN_PASSWORD: secret
volumes:
- ./grafana/:/etc/grafana/provisioning/
networks:
- prometheus_network
restart: unless-stopped