-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
75 lines (69 loc) · 1.54 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3.8"
services:
postgres:
image: postgres:latest
environment:
POSTGRES_USER: ${postgres_username}
POSTGRES_PASSWORD: ${postgres_password}
POSTGRES_DB: ${postgres_dbname}
healthcheck:
test: ["CMD", "pg_isready", "-d", "${postgres_username}", "-U", "${postgres_username}"]
timeout: 30s
interval: 10s
retries: 3
networks:
- my_network
expose:
- "5432"
volumes:
- ./data/postgres:/var/lib/postgresql/data
api:
image: myapi
environment:
POSTGRES_USER: ${postgres_username}
POSTGRES_PASSWORD: ${postgres_password}
POSTGRES_DB: ${postgres_dbname}
POSTGRES_HOST: postgres
expose:
- "8000"
networks:
- my_network
depends_on:
- postgres
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "80:80"
networks:
- my_network
depends_on:
- api
prometheus:
image: prom/prometheus:latest
volumes:
- ./data/prometheus:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
depends_on:
- api
networks:
- my_network
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
networks:
- my_network
environment:
GF_SECURITY_ADMIN_USER: ${grafana_username}
GF_SECURITY_ADMIN_PASSWORD: ${grafana_password}
volumes:
- ./data/grafana:/var/lib/grafana
depends_on:
- prometheus
networks:
my_network:
driver: bridge