forked from rajeevshukla/spring-microservices-with-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·101 lines (93 loc) · 2.87 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
version: "3.3"
services:
spring-cloud-config-server:
image: rajeevshukla/spring-cloud-config-server
ports:
- "8888:8888"
environment:
- "SPRING_PROFILES_ACTIVE=prod"
netflix-eureka-naming-server:
image: rajeevshukla/netflix-eureka-naming-server
ports:
- "8761:8761"
environment:
- "SPRING_PROFILES_ACTIVE=prod"
rabbitmq:
image: rabbitmq:management
ports:
- "15672:15672"
- "5672:5672"
volumes:
- /root/rabbitmq_data:/var/lib/rabbitmq
mysql:
image: mysql:5.6
ports:
- "3306:3306"
restart: always
container_name: mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=user_db
- MYSQL_USER=root
- MYSQL_PASSWORD=password
volumes:
- /root/mysql_data:/var/lib/mysql
spring-boot-email:
image: rajeevshukla/email-service
depends_on:
- rabbitmq
- spring-cloud-config-server
- netflix-eureka-naming-server
- zipkin
ports:
- "8089:8089"
links:
- rabbitmq
- spring-cloud-config-server
- netflix-eureka-naming-server
- zipkin
#deploy:
# mode: replicated
#replicas: 2
command: ["./wait-for-it.sh"," spring-cloud-config-server:8888","--", "./wait-for-it.sh", "rabbitmq:15672","--","./wait-for-it.sh", "netflix-eureka-naming-server:8761","--", "java","-jar","email-service-0.0.1-SNAPSHOT.jar" ]
environment:
- "SPRING_PROFILES_ACTIVE=prod"
spring-boot-user-registration:
image: rajeevshukla/user-registration-service
depends_on:
- mysql
- rabbitmq
- spring-cloud-config-server
- netflix-eureka-naming-server
- zipkin
ports:
- "8080:8080"
links:
- mysql
- rabbitmq
- spring-cloud-config-server
- netflix-eureka-naming-server
- zipkin
# deploy:
# mode: replicated
# replicas: 2
command: ["./wait-for-it.sh","spring-cloud-config-server:8888","--","./wait-for-it.sh", "rabbitmq:15672","--", "./wait-for-it.sh", "mysql:3306","--","./wait-for-it.sh", "netflix-eureka-naming-server:8761", "--","java", "-jar", "user-registration-service-0.0.1-SNAPSHOT.jar"]
environment:
- "SPRING_PROFILES_ACTIVE=prod"
netflix-cloud-zuul-server:
image: rajeevshukla/netflix-cloud-zuul-server
ports:
- "8889:8889"
depends_on:
- netflix-eureka-naming-server
- zipkin
links:
- netflix-eureka-naming-server
- zipkin
command: ["./wait-for-it.sh", "netflix-eureka-naming-server:8761", "--","java", "-jar", "netflix-cloud-zuul-server-0.0.1-SNAPSHOT.jar"]
environment:
- "SPRING_PROFILES_ACTIVE=prod"
zipkin:
image: openzipkin/zipkin
ports:
- "9411:9411"