-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.42 KB
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
services:
postgres:
image: postgres:15
container_name: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "postgres"
POSTGRES_DB: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
- ./docker/postgres/:/docker-entrypoint-initdb.d/
person-service:
build:
context: modules/person-service
args:
REMOTE_DEBUG: true
image: romanowalex/person-service:v1.0
container_name: person-service
environment:
SPRING_PROFILES_ACTIVE: docker
DATABASE_NAME: persons
DATABASE_USER: program
DATABASE_PASSWORD: test
ports:
- "8080:8080"
- "5005:5005"
healthcheck:
test: [ "CMD", "curl", "--silent", "--fail", "http://localhost:8080/manage/health" ]
interval: 10s
timeout: 10s
retries: 10
depends_on:
postgres:
condition: service_healthy
person-frontend:
build: modules/person-frontend
image: romanowalex/person-frontend:v1.0
container_name: person-frontend
ports:
- "8880:80"
healthcheck:
test: "curl --fail http://localhost || exit 1"
interval: 5s
timeout: 5s
retries: 5
depends_on:
person-service:
condition: service_healthy
volumes:
postgres: