-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
57 lines (55 loc) · 1.44 KB
/
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
48
49
50
51
52
53
54
55
56
57
version: '3'
services:
db:
image: postgres:latest
environment:
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
ports:
- "5432:5432"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myuser"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "2022:2022"
env_file:
- .env
depends_on:
db:
condition: service_healthy
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
# interval: 10s
# timeout: 5s
# retries: 5
prometheus:
image: prom/prometheus:v2.44.0
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
# depends_on:
# app:
# condition: service_healthy
grafana:
image: grafana/grafana:9.5.2
container_name: grafana
ports:
- "3000:3000"
restart: unless-stopped
volumes:
- ./monitoring/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./monitoring/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
- ./monitoring/grafana/provisioning/resource/Spring_Boot.json:/var/lib/grafana/dashboards/Spring_Boot.json
# depends_on:
# app:
# condition: service_healthy