This repository was archived by the owner on Nov 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
103 lines (97 loc) · 2.49 KB
/
docker-compose-dev.yml
File metadata and controls
103 lines (97 loc) · 2.49 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
services:
# The Cookie Factory backend in SpringBoot
tcf-server:
image: pns-isa-devops/2025-c-mfc-backend
build:
context: backend
args:
JAR_FILE: backend-1.0.0-SNAPSHOT.jar
container_name: backend
ports:
- "8080:8080"
environment:
- BANK_WITH_PORT=bank-system:9090
- POSTGRES_HOST=postgres:5432
entrypoint: "java -jar /opt/app/app.jar --bank.host.baseurl=http://$${BANK_WITH_PORT}"
restart: always
depends_on:
bank-system:
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
test: "curl --silent --fail localhost:8080/actuator/health | grep UP || exit 1"
interval: 5s
timeout: 3s
retries: 3
start_period: 10s
# the postgres DB to be connected to the backend
postgres:
image: postgres:17.2
container_name: db
environment:
- POSTGRES_PASSWORD=postgrespass
- POSTGRES_USER=postgresuser
- POSTGRES_DB=tcf-db
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d tcf-db -U $$POSTGRES_USER" ]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
volumes:
- db-data:/var/lib/postgresql/data
# A simple java CLI
tcf-cli:
image: pns-isa-devops/2025-c-mfc-cli
build:
context: cli
args:
JAR_FILE: cli-1.0.0-SNAPSHOT.jar
container_name: cli
environment:
- SERVER_WITH_PORT=tcf-server:8080
entrypoint: "java -jar /opt/app/app.jar"
depends_on:
tcf-server:
condition: service_healthy
volumes:
- ./cli/demo.txt:/opt/app/demo.txt
stdin_open: true
tty: true
healthcheck:
test: "curl --silent --fail localhost:8081/actuator/health | grep UP || exit 1"
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
# An external bank service in NestJs
bank-system:
image: pns-isa-devops/2025-c-mfc-bank
build:
context: bank
container_name: bank
ports:
- "9090:9090"
healthcheck:
test: [ "CMD", "/nodejs/bin/node" , "healthcheck.js" ]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
partner-server:
image: pns-isa-devops/2025-c-mfc-partner_server
build:
context: partner_server
container_name: partner
ports:
- "9091:9091"
healthcheck:
test: [ "CMD", "/nodejs/bin/node" , "healthcheck.js" ]
interval: 5s
timeout: 3s
retries: 3
start_period: 5s
volumes:
db-data: