-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
173 lines (163 loc) · 4.41 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
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
restart: always
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
healthcheck:
test: "echo stat | nc localhost $$ZOOKEEPER_CLIENT_PORT"
start_period: 30s
kafka:
image: wurstmeister/kafka
container_name: kafka
restart: always
ports:
- "9092:9092"
- "29092:29092"
depends_on:
- zookeeper
links:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
KAFKA_CREATE_TOPICS: "t_locations:1:1"
KAFKA_TOPIC: "t_locations"
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9092" ]
start_period: 30s
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.3
container_name: elasticsearch
restart: always
ports:
- "9200:9200"
- "9300:9300"
environment:
cluster.name: es-cluster
discovery.type: single-node
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
healthcheck:
test: "curl -f http://localhost:9200 || exit 1"
ulimits:
memlock:
soft: -1
hard: -1
zipkin:
container_name: zipkin
image: openzipkin/zipkin
restart: always
environment:
- STORAGE_TYPE=mem
# Uncomment to disable scribe
# - SCRIBE_ENABLED=false
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to enable debug logging
# - JAVA_OPTS=-Dlogging.level.zipkin=DEBUG
ports:
- '9411:9411'
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9411" ]
discovery-service:
container_name: discovery-service
image: discovery-service
build: ./discovery-service
restart: on-failure
ports:
- '8761:8761'
depends_on:
zipkin:
condition: service_healthy
kafka:
condition: service_healthy
elasticsearch:
condition: service_healthy
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8761" ]
config-service:
container_name: config-service
image: config-service
build: ./config-service
ports:
- '8888:8888'
restart: on-failure
environment:
- EUREKA_SERVER_URL=http://discovery-service:8761/eureka/
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8888" ]
depends_on:
discovery-service:
condition: service_healthy
zuul-gateway-service:
container_name: zuul-gateway-service
image: zuul-gateway-service
build: ./zuul-gateway-service
ports:
- '9000:9000'
environment:
- SPR_PROFILE=docker
- CONFIG_SERVER_URL=http://config-service:8888/
- ZIPKIN_SERVER=zipkin:9411
restart: on-failure
depends_on:
config-service:
condition: service_healthy
hystrix-dashboard-service:
container_name: hystrix-dashboard-service
image: hystrix-dashboard-service
build: ./hystrix-dashboard
ports:
- '9090:9090'
restart: on-failure
environment:
- SPR_PROFILE=docker
- CONFIG_SERVER_URL=http://config-service:8888/
depends_on:
config-service:
condition: service_healthy
user-service:
container_name: user-service
image: user-service
build: ./user-service
restart: on-failure
environment:
- SPR_PROFILE=docker
- CONFIG_SERVER_URL=http://config-service:8888/
- ZIPKIN_SERVER=zipkin:9411
ports:
- '9001:9001'
depends_on:
config-service:
condition: service_healthy
location-tracker-service:
container_name: location-tracker-service
image: location-tracker-service
build: ./location-tracker
restart: on-failure
ports:
- '9005:9005'
depends_on:
kafka:
condition: service_healthy
location-provider-service:
container_name: location-provider-service
image: location-provider-service
build: ./location-provider-service
restart: on-failure
ports:
- '9006:9006'
depends_on:
kafka:
condition: service_healthy
elasticsearch:
condition: service_healthy