forked from OmarElgabry/microservices-spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
88 lines (82 loc) · 2.16 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
version: '3'
services:
eureka-server:
container_name: eureka-server
image: eureka-server
build: ./spring-eureka-server
restart: on-failure
ports:
- '8761:8761'
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8761" ]
common-service:
container_name: common-service
image: common-service
build: ./spring-eureka-common
restart: on-failure
environment:
- SPR_PROFILE=docker
- EUREKA_SERVER_URL=http://eureka-server:8761/eureka
ports:
- '9200:9200'
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9200" ]
depends_on:
eureka-server:
condition: service_healthy
auth-service:
container_name: auth-service
image: auth-service
build: ./spring-eureka-auth
restart: on-failure
environment:
- SPR_PROFILE=docker
- EUREKA_SERVER_URL=http://eureka-server:8761/eureka
ports:
- '9100:9100'
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "9100" ]
depends_on:
common-service:
condition: service_healthy
zuul-gateway-service:
container_name: zuul-gateway-service
image: zuul-gateway-service
build: ./spring-eureka-zuul
restart: on-failure
environment:
- SPR_PROFILE=docker
- EUREKA_SERVER_URL=http://eureka-server:8761/eureka
ports:
- '8762:8762'
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "8762" ]
depends_on:
common-service:
condition: service_healthy
gallery-service:
container_name: gallery-service
image: gallery-service
build: ./spring-eureka-gallery
restart: on-failure
environment:
- SPR_PROFILE=docker
- EUREKA_SERVER_URL=http://eureka-server:8761/eureka
ports:
- '8100:8100'
depends_on:
common-service:
condition: service_healthy
image-service:
container_name: image-service
image: image-service
build: ./spring-eureka-image
restart: on-failure
environment:
- SPR_PROFILE=docker
- EUREKA_SERVER_URL=http://eureka-server:8761/eureka
ports:
- '8200:8200'
depends_on:
common-service:
condition: service_healthy