-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
179 lines (166 loc) · 4.08 KB
/
docker-compose.yml
File metadata and controls
179 lines (166 loc) · 4.08 KB
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
version: '3.8'
services:
config-server:
build:
context: ./config-server
dockerfile: Dockerfile
ports:
- "8888:8888"
networks:
- micro-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8888/actuator/health"]
interval: 10s
retries: 5
timeout: 5s
eureka-server:
build:
context: ./eureka-server
dockerfile: Dockerfile
ports:
- "8500:8500"
networks:
- micro-net
depends_on:
config-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8500/actuator/health"]
interval: 10s
retries: 5
timeout: 5s
api-gateway:
build:
context: ./api-gateway
dockerfile: Dockerfile
ports:
- "8502:8502"
networks:
- micro-net
depends_on:
eureka-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8502/actuator/health"]
interval: 10s
retries: 5
timeout: 5s
user-service:
build:
context: ./user-service
dockerfile: Dockerfile
ports:
- "8501"
networks:
- micro-net
depends_on:
api-gateway:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/actuator/health"]
interval: 10s
retries: 5
timeout: 5s
product-service:
build:
context: ./product-service
dockerfile: Dockerfile
ports:
- "8504"
networks:
- micro-net
depends_on:
api-gateway:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8504/actuator/health" ]
interval: 10s
retries: 5
timeout: 5s
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ports:
- "9200:9200"
volumes:
- esdata:/usr/share/elasticsearch/data
networks:
- elastic-net
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=50s" ]
interval: 30s
retries: 3
start_period: 10s
timeout: 20s
kibana: # Kibana is a data visualization and exploration tool used to interact with and visualize data stored in Elasticsearch
image: docker.elastic.co/kibana/kibana:9.0.0
container_name: kibana
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- xpack.security.enabled=false
ports:
- "5601:5601"
networks:
- elastic-net
depends_on:
- elasticsearch
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:5601/api/status" ]
interval: 30s
retries: 3
start_period: 10s
timeout: 20s
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
networks:
- kafka-net
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- "9092:9092"
- "9093:9093"
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: INSIDE://0.0.0.0:9092,OUTSIDE://0.0.0.0:9093
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9092,OUTSIDE://localhost:9093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_CREATE_TOPICS: "logs-topic:1:1,order-topic:1:1"
networks:
- kafka-net
depends_on:
- zookeeper
redis:
image: redis:7.2-alpine
container_name: redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
restart: always
zipkin:
image: openzipkin/zipkin:latest
container_name: zipkin
ports:
- "9411:9411"
environment:
- STORAGE_TYPE=mem
restart: unless-stopped
networks:
micro-net:
driver: bridge
elastic-net:
driver: bridge
kafka-net:
driver: bridge
volumes:
redis-data: