Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (92 loc) · 2.43 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (92 loc) · 2.43 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
version: '3.8'
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
common:
build:
context: .
dockerfile: Dockerfile-common
depends_on:
- postgres
- rabbitmq
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_JPA_HIBERNATE_DDL_AUTO: validate
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
SPRING_LIQUIBASE_ENABLED: "true"
SPRING_LIQUIBASE_CHANGELOG: classpath:/db/changelog/db.changelog-common.xml
healthcheck:
test: [ "CMD-SHELL", "curl --silent localhost:8080/actuator/health | jq -e '.status==\"UP\"'" ]
interval: 20s
timeout: 5s
retries: 5
start_period: 40s
account:
build:
context: .
dockerfile: Dockerfile-account
depends_on:
- postgres
- common
ports:
- "8081:8081"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
healthcheck:
test: [ "CMD-SHELL", "curl --silent localhost:8081/actuator/health | jq -e '.status==\"UP\"'" ]
interval: 20s
timeout: 5s
retries: 5
start_period: 40s
transaction:
build:
context: .
dockerfile: Dockerfile-transaction
depends_on:
- postgres
- common
- account
ports:
- "8083:8083"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672
balance:
build:
context: .
dockerfile: Dockerfile-balance
depends_on:
- postgres
- common
- account
- transaction
ports:
- "8082:8082"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/postgres
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_RABBITMQ_PORT: 5672