forked from Development-team-1/just-pickup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
189 lines (174 loc) · 4.36 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
188
189
version: "3"
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
networks:
justpickup-network:
ipv4_address: 172.18.0.100
kafka:
image: wurstmeister/kafka:2.12-2.3.0
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.18.0.101
KAFKA_CREATE_TOPICS: "test:1:1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
networks:
- justpickup-network
zipkin:
container_name: zipkin
image: openzipkin/zipkin
ports:
- "9411:9411"
networks:
- justpickup-network
discovery:
container_name: discovery
build:
context: ./discovery-service/
dockerfile: Dockerfile
ports:
- 8761:8761
networks:
- justpickup-network
owner-gateway:
container_name: owner-gateway
build:
context: ./owner-apigateway-service/
dockerfile: Dockerfile
ports:
- 8001:8001
networks:
- justpickup-network
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
customer-gateway:
container_name: customer-gateway
build:
context: ./customer-apigateway-service/
dockerfile: Dockerfile
ports:
- 8000:8000
networks:
- justpickup-network
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
config:
container_name: config
build:
context: ./config-service/
dockerfile: Dockerfile
ports:
- 8888:8888
networks:
- justpickup-network
postgres-db:
container_name: postgres
build:
context: ./postgres_data/
dockerfile: Dockerfile
ports:
- 5432:5432
networks:
- justpickup-network
redis:
container_name: redis
image: redis:alpine
command: redis-server --port 6379
hostname: redis_boot
labels:
- "name=redis"
- "mode=standalone"
ports:
- 6379:6379
networks:
- justpickup-network
user-service:
container_name: user
build:
context: ./user-service/
dockerfile: Dockerfile
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.config.import=optional:configserver:http://config:8888
- spring.datasource.url=jdbc:postgresql://postgres:5432/userdb
- spring.redis.host=redis
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
- config
- postgres-db
- redis
restart: always
networks:
- justpickup-network
order-service:
container_name: order
build:
context: ./order-service/
dockerfile: Dockerfile
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.datasource.url=jdbc:postgresql://postgres:5432/orderdb
- kafka.host=172.18.0.101
- kafka.port=9092
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
- config
- postgres-db
- kafka
restart: always
networks:
- justpickup-network
store-service:
container_name: store
build:
context: ./store-service/
dockerfile: Dockerfile
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.datasource.url=jdbc:postgresql://postgres:5432/storedb
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
- config
- postgres-db
restart: always
networks:
- justpickup-network
notification-service:
container_name: notification
build:
context: ./notification-service/
dockerfile: Dockerfile
environment:
- eureka.client.serviceUrl.defaultZone=http://discovery:8761/eureka/
- spring.datasource.url=jdbc:postgresql://postgres:5432/notificationdb
- spring.zipkin.base-url=http://zipkin:9411
depends_on:
- discovery
- config
- postgres-db
restart: always
networks:
- justpickup-network
networks:
justpickup-network:
driver: bridge
ipam:
config:
- subnet: 172.18.0.0/16
gateway: 172.18.0.1