forked from apssouza22/java-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
173 lines (159 loc) · 3.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: '2'
services:
config:
image: todo/config-server
ports:
- 8888:8888
networks:
- net
hostname: config
container_name: config
external_links:
- elk
- kafka
eureka:
image: todo/eureka-server
ports:
- 8010:8010
networks:
- net
depends_on:
- config
hostname: eureka
container_name: eureka
command: ["./wait-for-it.sh","config:8888","--timeout=100","--","/usr/local/bin/start.sh"]
external_links:
- elk
reminder:
image: todo/reminder-service
ports:
- 8015:8015
networks:
- net
depends_on:
- eureka
- admin
hostname: reminder
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
- kafka
user:
image: todo/user-service
ports:
- 8016:8016
networks:
- net
depends_on:
- eureka
- admin
hostname: user
container_name: user
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
- kafka
oauth:
image: todo/oauth-server
ports:
- 8017:8017
networks:
- net
depends_on:
- eureka
- user
- admin
hostname: oauth
container_name: oauth
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
gateway:
image: todo/api-gateway
ports:
- 8018:8018
networks:
- net
depends_on:
- eureka
- admin
hostname: gateway
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
mail:
image: todo/mail-service
ports:
- 8020:8020
networks:
- net
depends_on:
- eureka
- admin
hostname: mail
container_name: mail
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
- kafka
admin:
image: todo/admin-server
depends_on:
- eureka
container_name: admin
ports:
- 8026:8026
networks:
- net
environment:
- EUREKA_SERVICE_URL=http://eureka:8010
- EUREKA_INSTANCE_PREFER_IP_ADDRESS=true
- LOGGING_FILE=/tmp/admin.log
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
zookeeper:
image: wurstmeister/zookeeper
ports:
- 2181:2181
networks:
- net
mem_limit: 925288000
cpu_shares: 100
kafka:
image: wurstmeister/kafka
ports:
- 9092
depends_on:
- zookeeper
environment:
KAFKA_ADVERTISED_HOST_NAME: 172.19.0.1
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_CREATE_TOPICS: "todo-mail:1:1"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
hostname: kafka
container_name: kafka
networks:
- net
mem_limit: 925288000
cpu_shares: 100
proxy:
build: proxy/
ports:
- 8055:80
networks:
- net
depends_on:
- gateway
hostname: proxy
container_name: proxy
command: ["./wait-for-it.sh","gateway:8018","--timeout=50","--","/usr/local/bin/start.sh"]
volumes:
todo_data:
external: true
todo_elk:
external: true
networks:
net:
driver: bridge