-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
187 lines (174 loc) · 6.85 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
185
186
187
version: '3'
services:
gateway-server:
image: gateway-server-image
container_name: gateway-server-container
ports:
- '5555:5555'
environment:
- SECURE_KEY_USERNAME=randomSecureKeyUsername!
- SECURE_KEY_PASSWORD=randomSecureKeyPassword!
- PASSENGER_SERVICE_URL=passenger-service:4444
- DRIVER_SERVICE_URL=driver-service:3333
- DATABASE_URL=jdbc:h2:mem:db_gateway
- DATABASE_USERNAME=root
- DATABASE_PASSWORD=1234
- JWT_PUBLIC_KEY=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmKUXKxF3hJrntm3+BAWnjD5vup4DUHqmg9ewXbkTxHufpxcpjFTUOTPg9j30kT4L1pNHp3HbrJ5mu15MjiOgSvIBNrjieVTOID1X1mo7EsFwg4Gs4bgX3+MtUxNueSZ9qCgiWI+Q5c71S9ZqFE4VfUKsXphnzGMI49fZRSpv10irsBaOSDJ+iLroNJoH3SdvzJC0hjTUatlpVENv/36sRKm3E1xIph9zjSsoawaLSzpw1kl9ZJ76OQ9l3LdkGG58qhNICnFrguR0zAhT/eWvd6y5s1sDwl8FMQ0PbC0xZuIHwX9Cs6NyPaEff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sq6OYKCFG6Dm3xiljfOQbDyGva+Pk8OylbERKHIo0enL2cVGnDb2cd2340szMdowKBgC8WGDR72Pj2QXB8c8UaJ4eBJQ8lHpslxuDRjYXXmmvAEAlwfma9IJcLyompzuMm5OvABeKysQq5K7lk67WLFZWH32n7zeNXgeeyuM/SZ6J1+GoB0NuOPRqOfreVcFhExjlSQoJkJvjBmZTI7wMjGqcpixa+/WHHVWgDujoGWnCFAoGARiUapucnQpN0BHbcbnqu314JEPvFnkPsFY0DUAp4vDin5qzIg4Ae0+D+k8ks3RNajrkUNZVNe1aTm8/9bf+LDekMHpIqAgsbQuuCUAlui/cOQQPYe90VQNJciBtLbcXn4qGkS0P/sXgXJfh15bfPFl7Swqji1BsiBvswDUltLq8CgYEAsV7+sSszLSU/y3CCGyAs9ECshfmYFctoReRN2JQ0OEL5bFMwAg/Ysiwvf/TBZl5aE6GGtuSe0nIrlcD0+DvBqzW6UmHV9XHsX/qiLNPU/BvNPiwjS9W/Je9w8nlildXRQpaS0tJu4CTmIpI6OpWTCEv79YcUIQ/0rQpNHPheBx8=
networks:
- microservicesNetwork
driver-service:
image: driver-service-image
container_name: driver-service-container
depends_on:
- broker
- postgresql
- elasticsearch
- redis
ports:
- '3333:3333'
environment:
- NOTIFICATION_SERVICE_URL=notification-service:8888
- SECURE_KEY_USERNAME=randomSecureKeyUsername!
- SECURE_KEY_PASSWORD=randomSecureKeyPassword!
- KAFKA_GROUP_ID=driver-group
- KAFKA_BOOTSTRAP_SERVERS=broker:29092
- ELASTIC_SEARCH_DOMAIN=elasticsearch
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgresql:5432/postgres
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=12345
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
- REDIS_HOST=redis
- REDIS_PORT=6379
networks:
- microservicesNetwork
passenger-service:
image: passenger-service-image
container_name: passenger-service-container
ports:
- '4444:4444'
environment:
- PAYMENT_SERVICE_URL=payment-service:7777
- SECURE_KEY_USERNAME=randomSecureKeyUsername!
- SECURE_KEY_PASSWORD=randomSecureKeyPassword!
networks:
- microservicesNetwork
notification-service:
image: notification-service-image
container_name: notification-service-container
ports:
- '8888:8888'
environment:
- SECURE_KEY_USERNAME=randomSecureKeyUsername!
- SECURE_KEY_PASSWORD=randomSecureKeyPassword!
- TWILIO_ACCOUNT_SID=test
- TWILIO_AUTH_TOKEN=test
- TWILIO_PHONE_NUMBER=test
networks:
- microservicesNetwork
payment-service:
image: payment-service-image
container_name: payment-service-container
ports:
- '7777:7777'
environment:
- SECURE_KEY_USERNAME=randomSecureKeyUsername!
- SECURE_KEY_PASSWORD=randomSecureKeyPassword!
- KAFKA_GROUP_ID=payment-group
- KAFKA_BOOTSTRAP_SERVERS=broker:29092
networks:
- microservicesNetwork
zookeeper:
image: confluentinc/cp-zookeeper:7.0.1
container_name: zookeeper
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
networks:
- microservicesNetwork
broker:
image: confluentinc/cp-kafka:7.0.1
container_name: broker
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
GROUP_ID: driver-group-id
KAFKA_CREATE_TOPICS: "contact-info-events"
networks:
- microservicesNetwork
kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
ports:
- "8080:8080"
restart: always
environment:
- KAFKA_CLUSTERS_0_NAME=broker
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=broker:29092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
- KAFKA_CLUSTERS_0_READONLY=true
networks:
- microservicesNetwork
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
container_name: elastic-search
platform: linux/x86_64
environment:
- discovery.type=single-node
- max_open_files=65536
- max_content_length_in_bytes=100000000
- transport.host= elasticsearch
volumes:
- $HOME/app:/var/app
ports:
- "9200:9200"
- "9300:9300"
networks:
- microservicesNetwork
postgresql:
image: postgres
container_name: postgresql
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: 12345
networks:
- microservicesNetwork
adminer:
image: adminer
container_name: adminer
restart: always
ports:
- '8081:8080'
networks:
- microservicesNetwork
redis:
image: redis:6.2-alpine
container_name: redis-container
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning
volumes:
- cache:/data
networks:
- microservicesNetwork
networks:
microservicesNetwork:
volumes:
cache:
driver: local