-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
62 lines (59 loc) · 1.39 KB
/
Copy pathcompose.yaml
File metadata and controls
62 lines (59 loc) · 1.39 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
services:
payment-postgres:
image: postgres:16-alpine
container_name: payment-postgres
restart: unless-stopped
environment:
POSTGRES_DB: payment_gateway
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- payment_postgres_data:/var/lib/postgresql/data
networks:
- payment-network
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USERNAME} -d payment_gateway"
]
interval: 10s
timeout: 5s
retries: 5
payment-gateway:
build:
context: .
dockerfile: Dockerfile
container_name: payment-gateway
restart: unless-stopped
ports:
- "8080:8080"
environment:
DB_URL: jdbc:postgresql://payment-postgres:5432/payment_gateway
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
BANK_BASE_URL: ${BANK_BASE_URL}
JAVA_TOOL_OPTIONS: "-Xms128m -Xmx384m"
depends_on:
payment-postgres:
condition: service_healthy
networks:
- payment-network
healthcheck:
test:
[
"CMD",
"curl",
"--fail",
"--silent",
"http://localhost:8080/actuator/health/readiness"
]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
volumes:
payment_postgres_data:
networks:
payment-network:
name: payment-network