-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
47 lines (42 loc) · 1.03 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
version: '3'
services:
postgres:
image: postgres:latest
ports:
- "5432:5432"
environment:
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
- POSTGRES_DB=$POSTGRES_DB
volumes:
- db-data:/var/lib/postgresql/data/
api:
build: api
ports:
- "8888:8888"
command: "python main.py"
environment:
- DB_URI=$DB_URI
prometheus:
image: prom/prometheus:latest
volumes:
- prometheus-data:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
ports:
- 9090:9090
grafana:
image: grafana/grafana:latest
volumes:
- grafana-data:/var/lib/grafana
- ./datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
environment:
- GF_SECURITY_ADMIN_USER=$GF_SECURITY_ADMIN_USER
- GF_SECURITY_ADMIN_PASSWORD=$GF_SECURITY_ADMIN_PASSWORD
- GF_USERS_ALLOW_SIGN_UP=false
ports:
- "3000:3000"
volumes:
db-data:
prometheus-data:
grafana-data: