-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
184 lines (174 loc) · 4.34 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
version: "3.8"
networks:
wallet-net:
external: true
services:
account-db:
image: postgres:13
hostname: account-db
container_name: account-db
restart: always
networks:
- wallet-net
ports:
- 5432:5432
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=account
tty: true
volumes:
- ./.docker/account-db:/var/lib/postgresql/data
transaction-db:
image: postgres:13
hostname: transaction-db
container_name: transaction-db
restart: always
networks:
- wallet-net
ports:
- 5433:5432
environment:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- POSTGRES_DB=transaction
tty: true
volumes:
- ./.docker/transaction-db:/var/lib/postgresql/data
account-ms:
hostname: account-ms
container_name: account-ms
build:
context: services/account
dockerfile: Dockerfile
target: development
volumes:
- $PWD/services/account:/usr/src/app
- $PWD/services/account/usr/src/app/node_modules
- $HOME/.cache/yarn:/yarncache
command: yarn start:dev
environment:
- DATABASE_URL=postgresql://admin:admin@account-db/account
- KAFKA_URL=kafka:9092
networks:
- wallet-net
ports:
- 3000:3000
depends_on:
- account-db
- kafka
transaction-ms:
hostname: transaction-ms
container_name: transaction-ms
build:
context: services/transaction
dockerfile: Dockerfile
target: development
volumes:
- $PWD/services/transaction:/usr/src/app
- $PWD/services/transaction/usr/src/app/node_modules
- $HOME/.cache/yarn:/yarncache
command: yarn start:dev
environment:
- DATABASE_URL=postgresql://admin:admin@transaction-db/transaction
- KAFKA_URL=kafka:9092
- MONGO_URL=mongodb://admin:example@mongo-db/db_audit?authSource=db_audit
networks:
- wallet-net
ports:
- 3010:3010
depends_on:
- transaction-db
- kafka
- mongo-db
donkey-kong:
container_name: donkey-kong
build:
context: services/kong
dockerfile: Dockerfile
target: development
user: "kong"
environment:
KONG_DATABASE: 'off'
KONG_DECLARATIVE_CONFIG: /kong/declarative/kong.yaml
KONG_ADMIN_LISTEN: "0.0.0.0:8001, 0.0.0.0:8444 ssl"
networks:
- wallet-net
ports:
- "8000:8000/tcp"
- "127.0.0.1:8001:8001/tcp"
- "8443:8443/tcp"
- "127.0.0.1:8444:8444/tcp"
volumes:
- $PWD/services/kong:/kong/declarative/
healthcheck:
test: ["CMD", "kong", "health"]
interval: 10s
timeout: 10s
retries: 10
restart: on-failure
deploy:
restart_policy:
condition: on-failure
mongo-db:
image: mongo
hostname: mongo-db
container_name: mongo-db
restart: always
networks:
- wallet-net
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=Pa55word
- MONGO_INITDB_DATABASE=db_audit
- MONGO_USERNAME=admin
- MONGO_PASSWORD=example
volumes:
- ./.docker/mongo-data:/data/db
- ./.docker/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
zook:
image: confluentinc/cp-zookeeper:latest
hostname: zook
container_name: zook
environment:
- ZOOKEEPER_CLIENT_PORT=2181
networks:
- wallet-net
ports:
- 2181:2181
kafka:
image: confluentinc/cp-kafka:latest
hostname: kafka
container_name: kafka
ports:
- 9092:9092
environment:
- KAFKA_BROKER_ID=1
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKAJS_NO_PARTITIONER_WARNING=1
- KAFKA_ZOOKEEPER_CONNECT=zook:2181
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT
networks:
- wallet-net
depends_on:
- zook
kafka-ui:
container_name: kafka-ui
hostname: kafka-ui
image: provectuslabs/kafka-ui:latest
restart: always
environment:
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zook:2181
- KAFKA_CLUSTERS_0_NAME=local
networks:
- wallet-net
ports:
- 8080:8080
depends_on:
- zook
- kafka