-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 1.2 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
name: healthmed
services:
healthmed_db:
image: postgres:15.4
volumes:
- healthmed_db:/var/lib/postgresql/data
environment:
POSTGRES_DB: healthmed
POSTGRES_USER: meduser
POSTGRES_PASSWORD: health@Med123!
ports:
- "5432:5432"
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB" ]
interval: 10s
timeout: 5s
retries: 5
healthmed_api:
image: fiap-3soat-g15-healthmed-api:latest
build:
context: .
dockerfile: Dockerfile
depends_on:
healthmed_db:
condition: service_healthy
environment:
DB_ENDPOINT: healthmed_db:5432
DB_NAME: healthmed
DB_USERNAME: meduser
DB_PASSWORD: health@Med123!
ports:
- "8080:8080"
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "curl -sf http://localhost:8080/actuator/health | grep -q \"UP\" || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
healthmed_db: