forked from cer/microservices-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (72 loc) · 2.06 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
rabbitmq:
image: rabbitmq:3.5.3-management
ports:
- "5672:5672"
- "15672:15672"
eureka:
image: java:openjdk-8u91-jdk
working_dir: /app
volumes:
- ./eureka-server/build/libs:/app
command: java -jar /app/eureka-server.jar --server.port=8761
ports:
- "8761:8761"
zipkin:
image: java:openjdk-8u91-jdk
working_dir: /app
volumes:
- ./zipkin-server/build/libs:/app
command: java -jar /app/zipkin-server.jar --server.port=9411
links:
- rabbitmq
ports:
- "9411:9411"
environment:
RABBIT_HOST: rabbitmq
mongodb:
image: mongo:3.0.4
ports:
- "27017:27017"
command: mongod --smallfiles
restfulservice:
image: java:openjdk-8u91-jdk
working_dir: /app
volumes:
- ./spring-boot-restful-service/build/libs:/app
command: java -jar /app/spring-boot-restful-service.jar
ports:
- "8081:8080"
links:
- rabbitmq
- mongodb
- eureka
environment:
SPRING_DATA_MONGODB_URI: mongodb://mongodb/userregistration
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_APPLICATION_NAME: registration-service
SPRING_PROFILES_ACTIVE: enableEureka
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true"
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PERCENTAGE: 1
web:
image: java:openjdk-8u91-jdk
working_dir: /app
volumes:
- ./spring-boot-webapp/build/libs:/app
command: java -jar /app/spring-boot-webapp.jar
ports:
- "8080:8080"
links:
- eureka
- rabbitmq
environment:
USER_REGISTRATION_URL: http://REGISTRATION-SERVICE/user
SPRING_APPLICATION_NAME: registration-web
SPRING_PROFILES_ACTIVE: enableEureka
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true"
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/
SPRING_RABBITMQ_HOST: rabbitmq
SPRING_SLEUTH_ENABLED: "true"
SPRING_SLEUTH_SAMPLER_PERCENTAGE: 1
SPRING_SLEUTH_WEB_SKIPPATTERN: "/api-docs.*|/autoconfig|/configprops|/dump|/health|/info|/metrics.*|/mappings|/trace|/swagger.*|.*\\.png|.*\\.css|.*\\.js|/favicon.ico|/hystrix.stream"