forked from mojaloop/bulk-api-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
147 lines (139 loc) · 3.76 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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.7"
networks:
ba-mojaloop-net:
name: ba-mojaloop-net
services:
bulk-api-adapter:
build:
context: .
cache_from:
- mojaloop/bulk-api-adapter
- bulk-api-adapter
container_name: ba_bulk-api-adapter
command:
- "sh"
- "-c"
- "sh /opt/wait-for/wait-for-bulk-api-adapter.sh && node src/api/index.js"
ports:
- "3003:3003"
environment:
- LOG_LEVEL=info
- CSL_LOG_TRANSPORT=file
volumes:
- ./docker/bulk-api-adapter/default.json:/opt/bulk-api-adapter/config/default.json
- ./docker/wait-for:/opt/wait-for
networks:
- ba-mojaloop-net
depends_on:
- central-ledger
- kafka
- objstore
healthcheck:
test: ["CMD", "sh", "-c" ,"apk --no-cache add curl", ";", "curl", "http://localhost:3003/health"]
timeout: 20s
retries: 10
interval: 30s
objstore:
image: mongo:latest
container_name: ba_objstore
logging:
driver: none
ports:
- "27017:27017"
networks:
- ba-mojaloop-net
healthcheck:
test: mongo localhost:27017/test --quiet 1
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
central-ledger:
image: mojaloop/central-ledger:latest
container_name: ba_central-ledger
command:
- "sh"
- "-c"
- "sh /opt/wait-for/wait-for-central-ledger.sh && node src/api/index.js"
links:
- mysql
- kafka
ports:
- "3001:3001"
volumes:
- ./docker/central-ledger/default.json:/opt/central-ledger/config/default.json
- ./docker/wait-for:/opt/wait-for
depends_on:
- mysql
- kafka
environment:
- CLEDG_DATABASE_URI=mysql://central_ledger:password@mysql:3306/central_ledger
- CLEDG_SIDECAR__DISABLED=true
networks:
- ba-mojaloop-net
healthcheck:
test: ["CMD", "bash", "-c" ,"apk --no-cache add curl", ";", "curl", "http://localhost:3001/health"]
timeout: 20s
retries: 10
interval: 30s
mysql:
image: mysql/mysql-server
container_name: ba_mysql
logging:
driver: none
ports:
- "3306:3306"
volumes:
# this fixes the permissions issue, but docker-compose up will fail on first attempt
- ./docker/sql-init/:/docker-entrypoint-initdb.d/
environment:
- MYSQL_USER=${DBUSER:-central_ledger}
- MYSQL_PASSWORD=${DBPASS:-password}
- MYSQL_DATABASE=${DBUSER:-central_ledger}
- MYSQL_ALLOW_EMPTY_PASSWORD=true
networks:
- ba-mojaloop-net
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "mysql"]
timeout: 20s
retries: 10
start_period: 40s
interval: 30s
kafka:
image: johnnypark/kafka-zookeeper:2.3.0
container_name: ba_kafka
logging:
driver: none
volumes:
- ./docker/kafka/:/opt/kafka_2.12-2.3.0/config/
ports:
- "2181:2181"
- "9092:9092"
environment:
- ZOO_LOG4J_PROP=WARN
networks:
- ba-mojaloop-net
healthcheck:
test: ["CMD" ,"/opt/kafka_2.12-2.3.0/bin/kafka-broker-api-versions.sh","--bootstrap-server","localhost:9092"]
timeout: 20s
retries: 10
start_period: 40s
interval: 30s
simulator:
image: mojaloop/simulator:latest
container_name: ba_simulator
ports:
- "8444:8444"
environment:
- LOG_LEVEL=info
- TRANSFERS_ENDPOINT=http://host.docker.internal:3000
- QUOTES_ENDPOINT=http://host.docker.internal:3002
- PARTIES_ENDPOINT=http://host.docker.internal:4002
- TRANSFERS_FULFIL_RESPONSE_DISABLED=false
networks:
- ba-mojaloop-net
healthcheck:
test: ["CMD", "sh", "-c" ,"apk --no-cache add curl", ";", "curl", "http://localhost:8444/health"]
timeout: 20s
retries: 10
interval: 30s