-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
153 lines (141 loc) · 3.73 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
version: '3.3'
services:
db_identity:
container_name: pds_delivery_identity_db
image: postgres
ports:
- "5433:5432"
environment:
POSTGRES_USER: identity
POSTGRES_PASSWORD: identity123
POSTGRES_DB: delivery_identity
db_order:
container_name: pds_delivery_order_db
image: postgres
ports:
- "5434:5432"
environment:
POSTGRES_USER: order
POSTGRES_PASSWORD: order123
POSTGRES_DB: delivery_order
db_delivery:
container_name: pds_delivery_parcel_db
image: postgres
ports:
- "5435:5432"
environment:
POSTGRES_USER: delivery
POSTGRES_PASSWORD: delivery123
POSTGRES_DB: delivery_parcel
redis:
container_name: pds_redis
image: "redis:alpine"
ports:
- "6379:6379"
restart: always
zookeeper:
container_name: pds_zookeeper
image: confluentinc/cp-zookeeper:latest
ports:
- "22181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
container_name: pds_kafka
image: confluentinc/cp-kafka:latest
ports:
- "29092:29092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
kafdrop:
container_name: pds_kafdrop
image: obsidiandynamics/kafdrop
ports:
- "9000:9000"
expose:
- 9000
depends_on:
- zookeeper
- kafka
environment:
ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_BROKERCONNECT: kafka:9092
api-gateway:
container_name: pds_api-gateway
image: pds/api-gateway:1.0
ports:
- "127.0.0.1:8080:8080"
restart: unless-stopped
build:
context: api-gateway
dockerfile: Dockerfile
environment:
ZUUL_ROUTES_MS-IDENTITY_URL: http://ms-identity:8081
ZUUL_ROUTES_MS-ORDER_URL: http://ms-order:8082
ZUUL_ROUTES_MS-DELIVERY_URL: http://ms-delivery:8083
ms-identity:
container_name: pds_ms-identity
image: pds/ms-identity:1.0
ports:
- "127.0.0.1:8081:8081"
restart: unless-stopped
build:
context: ms-identity
dockerfile: Dockerfile
depends_on:
- db_identity
- redis
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db_identity:5432/delivery_identity
APPLICATION_REDIS_ADDRESS: redis://redis:6379
ms-order:
container_name: pds_ms-order
image: pds/ms-order:1.0
ports:
- "127.0.0.1:8082:8082"
restart: unless-stopped
build:
context: ms-order
dockerfile: Dockerfile
depends_on:
- db_order
- kafka
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db_order:5432/delivery_order
SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS: kafka:9092
ms-delivery:
container_name: pds_ms-delivery
image: pds/ms-delivery:1.0
ports:
- "127.0.0.1:8083:8083"
restart: unless-stopped
build:
context: ms-delivery
dockerfile: Dockerfile
depends_on:
- db_delivery
- kafka
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db_delivery:5432/delivery_parcel
SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS: kafka:9092
ms-notification:
container_name: pds_ms-notification
image: pds/ms-notification:1.0
ports:
- "127.0.0.1:8084:8084"
restart: unless-stopped
build:
context: ms-notification
dockerfile: Dockerfile
depends_on:
- kafka
environment:
SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS: kafka:9092