-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (76 loc) · 2.15 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
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
services:
app:
build:
context: "./"
ports:
- "127.0.0.1:8080:8080"
healthcheck:
test: "wget --tries=1 --no-verbose -qO- http://localhost:8080/actuator/health | grep -q UP"
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
depends_on:
- postgres
environment:
bss.file-api.url: "http://mock-file-api:8080"
spring.security.user.password: "password"
spring.datasource.url: "jdbc:postgresql://postgres:5432/bss?currentSchema=private"
spring.datasource.username: "user"
spring.datasource.password: "password"
spring.flyway.default-schema: "private"
spring.flyway.schemas: "private,public"
management.endpoints.web.exposure.include: "prometheus,health"
postgres:
# update server/data/src/test/resources/application.yml
image: "postgres:16.3-alpine3.18"
environment:
POSTGRES_DB: "bss"
POSTGRES_USER: "user"
POSTGRES_PASSWORD: "password"
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: "pg_isready -q -U postgres"
start_period: 5s
interval: 30s
timeout: 5s
retries: 3
mock-file-api:
image: "wiremock/wiremock:2.35.0"
ports:
- "127.0.0.1:8888:8080"
healthcheck:
test: "curl -fs http://localhost:8080/__admin/docs > /dev/null || exit 1"
start_period: 5s
interval: 30s
timeout: 5s
retries: 3
volumes:
- "./stubs:/home/wiremock/mappings"
prometheus:
image: "prom/prometheus:v3.0.1"
ports:
- "127.0.0.1:9090:9090"
volumes:
- "./docker/prometheus.yml:/etc/prometheus/prometheus.yml"
profiles:
- metrics
healthcheck:
test: wget --tries=1 --no-verbose -qO- http://localhost:9090/-/ready | grep -q "Prometheus Server is Ready."
start_period: 5s
interval: 30s
timeout: 5s
retries: 3
grafana:
image: "grafana/grafana:11.2.2-ubuntu"
ports:
- "127.0.0.1:3000:3000"
volumes:
- "./docker/grafana:/var/lib/grafana"
profiles:
- metrics
depends_on:
- prometheus
healthcheck:
test: curl -fs http://localhost:3000/api/health | grep -q "\"ok\""