-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
154 lines (142 loc) · 4.2 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
version : "2.1"
services:
db:
image: mysql:5.6
container_name: docker-mysql
restart: always
ports:
- "3306:3306"
restart: always
networks:
- microservicesnet
volumes:
- ./init_schema:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: test
eureka:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: eureka
hostname: eureka
ports:
- "1111:1111"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker /data/servicediscovery-0.0.1-SNAPSHOT.jar
healthcheck:
test: curl --fail -s http://localhost:1111/info || exit 1
interval: 1m30s
timeout: 10s
retries: 3
config:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: config
hostname: config
ports:
- "5555:5555"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker /data/config-0.0.1-SNAPSHOT.jar
depends_on:
eureka:
condition: service_healthy
healthcheck:
test: curl --fail -s http://localhost:5555/info || exit 1
interval: 1m30s
timeout: 10s
retries: 3
customer1:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: customer1
ports:
- "2222:2222"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker -Dspring.datasource.url=jdbc:mysql://docker-mysql/microservices_cust -Dspring.datasource.password=test /data/customer-0.0.1-SNAPSHOT.jar
depends_on:
db:
condition: service_started
config:
condition: service_healthy
invoice1:
condition: service_started
inventory1:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: inventory1
ports:
- "3333:3333"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker -Dspring.datasource.url=jdbc:mysql://docker-mysql/microservices_prod -Dspring.datasource.password=test /data/inventory-0.0.1-SNAPSHOT.jar
depends_on:
db:
condition: service_started
config:
condition: service_healthy
invoice1:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: invoice1
ports:
- "4444:4444"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker -Dspring.datasource.url=jdbc:mysql://docker-mysql/microservices_invoice -Dspring.datasource.password=test /data/invoice-0.0.1-SNAPSHOT.jar
depends_on:
db:
condition: service_started
config:
condition: service_healthy
# monitor:
# image: hiteshjoshi1/microservice-docker-cart-example
# container_name: monitor
# ports:
# - "7777:7777"
# networks:
# - microservicesnet
# volumes:
# - ${HOME}/jarloc:/data
# command: -jar -Dspring.profiles.active=docker -Dspring.datasource.url=jdbc:mysql://docker-mysql/microservices_invoice -Dspring.datasource.password=test /data/monitor-0.0.1-SNAPSHOT.jar
# depends_on:
# db:
# condition: service_started
# config:
# condition: service_healthy
# customer1:
# condition: service_started
zuul:
image: hiteshjoshi1/microservice-docker-cart-example
container_name: zuul
ports:
- "1101:1101"
networks:
- microservicesnet
volumes:
- ${HOME}/jarloc:/data
command: -jar -Dspring.profiles.active=docker /data/zuulEdgeGateway-0.0.1-SNAPSHOT.jar
depends_on:
config:
condition: service_healthy
# zipkin:
# image: hiteshjoshi1/microservice-docker-cart-example
# container_name: zipkin
# ports:
# - "9411:9411"
# networks:
# - microservicesnet
# volumes:
# - ${HOME}/jarloc:/data
# command: -jar -Dspring.profiles.active=docker /data/zipkinTimer-0.0.1-SNAPSHOT.jar
# depends_on:
# config:
# condition: service_healthy
networks:
microservicesnet: