-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
43 lines (40 loc) · 960 Bytes
/
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
version: "3.8"
services:
postgres:
container_name: postgres_m
image: postgres:16.1
environment:
POSTGRES_DB: monitoring
POSTGRES_USER: secretUser
POSTGRES_PASSWORD: secretPassword
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}", "--quiet" ]
interval: 1s
timeout: 5s
retries: 10
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
tomcat:
container_name: tomcat_m
image: tomcat:jre17
ports:
- "8080:8080"
volumes:
- ./build/libs/monitoring-service.war:/usr/local/tomcat/webapps/monitoring-service.war
deploy:
restart_policy:
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
volumes:
postgres: