-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
85 lines (79 loc) · 1.68 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
auth-app:
container_name: auth-app
build:
context: .
target: release
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "${HTTP_PORT}:${HTTP_PORT}"
- "${GRPC_PORT}:${GRPC_PORT}"
- "${PROMETHEUS_HTTP_PORT}:${PROMETHEUS_HTTP_PORT}"
networks:
- database
prometheus:
image: prom/prometheus:v2.45.5
container_name: prometheus
ports:
- 9090:9090
volumes:
- ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
networks:
- metrics
grafana:
image: grafana/grafana:10.4.2
container_name: grafana
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
networks:
- metrics
postgres:
image: postgres:16.2
container_name: database
hostname: $$POSTGRES_HOST
env_file:
- .env
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 10s
timeout: 5s
retries: 5
volumes:
- auth-data:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
networks:
- database
redis:
image: redis:7.2.4-alpine
container_name: sessions
hostname: $$REDIS_HOST
env_file:
- .env
command: redis-server --requirepass "$REDIS_PASSWORD"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 15s
timeout: 10s
retries: 5
volumes:
- sessions-data:/data
networks:
- database
volumes:
auth-data:
sessions-data:
prometheus-data:
grafana-data:
networks:
database:
metrics: