-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
176 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,59 @@ | ||
rabbitmq: | ||
image: rabbitmq:3.5.3-management | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
version: '3' | ||
services: | ||
|
||
eureka: | ||
build: ./eureka-server | ||
ports: | ||
- "8761:8761" | ||
rabbitmq: | ||
image: rabbitmq:3.5.3-management | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
|
||
zipkin: | ||
build: ./zipkin-server | ||
links: | ||
- rabbitmq | ||
ports: | ||
- "9411:9411" | ||
environment: | ||
RABBIT_HOST: rabbitmq | ||
eureka: | ||
build: ./eureka-server | ||
ports: | ||
- "8761:8761" | ||
|
||
mongodb: | ||
image: mongo:3.0.4 | ||
ports: | ||
- "27017:27017" | ||
command: mongod --smallfiles | ||
zipkin: | ||
build: ./zipkin-server | ||
ports: | ||
- "9411:9411" | ||
depends_on: | ||
- rabbitmq | ||
environment: | ||
RABBIT_HOST: rabbitmq | ||
|
||
restfulservice: | ||
image: sb_rest_svc | ||
ports: | ||
- "8081:8080" | ||
links: | ||
- rabbitmq | ||
- mongodb | ||
- eureka | ||
environment: | ||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/userregistration | ||
SPRING_RABBITMQ_HOST: rabbitmq | ||
SPRING_APPLICATION_NAME: registration-service | ||
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true" | ||
SPRING_PROFILES_ACTIVE: enableEureka | ||
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/ | ||
mongodb: | ||
image: mongo:3.0.4 | ||
ports: | ||
- "27017:27017" | ||
command: mongod --smallfiles | ||
|
||
web: | ||
image: sb_web | ||
ports: | ||
- "8080:8080" | ||
links: | ||
- eureka | ||
environment: | ||
USER_REGISTRATION_URL: http://REGISTRATION-SERVICE/user | ||
SPRING_APPLICATION_NAME: registration-web | ||
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true" | ||
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/ | ||
SPRING_PROFILES_ACTIVE: enableEureka | ||
restfulservice: | ||
image: spring-boot-restful-service | ||
ports: | ||
- "8081:8080" | ||
depends_on: | ||
- rabbitmq | ||
- mongodb | ||
- eureka | ||
environment: | ||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/userregistration | ||
SPRING_RABBITMQ_HOST: rabbitmq | ||
SPRING_APPLICATION_NAME: registration-service | ||
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true" | ||
SPRING_PROFILES_ACTIVE: enableEureka | ||
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/ | ||
|
||
web: | ||
image: spring-boot-webapp | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- rabbitmq | ||
- mongodb | ||
- eureka | ||
environment: | ||
USER_REGISTRATION_URL: http://REGISTRATION-SERVICE/user | ||
SPRING_APPLICATION_NAME: registration-web | ||
EUREKA_INSTANCE_PREFER_IP_ADDRESS: "true" | ||
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE: http://eureka:8761/eureka/ | ||
SPRING_PROFILES_ACTIVE: enableEureka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,67 @@ | ||
rabbitmq: | ||
image: rabbitmq:3.5.3-management | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
version: '3' | ||
services: | ||
|
||
eureka: | ||
build: ./eureka-server | ||
ports: | ||
- "8761:8761" | ||
rabbitmq: | ||
image: rabbitmq:3.5.3-management | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
|
||
zipkin: | ||
build: ./zipkin-server | ||
links: | ||
- rabbitmq | ||
ports: | ||
- "9411:9411" | ||
environment: | ||
RABBIT_HOST: rabbitmq | ||
mongodb: | ||
image: mongo:3.0.4 | ||
ports: | ||
- "27017:27017" | ||
command: mongod --smallfiles | ||
|
||
mongodb: | ||
image: mongo:3.0.4 | ||
ports: | ||
- "27017:27017" | ||
command: mongod --smallfiles | ||
eureka: | ||
build: ./eureka-server | ||
ports: | ||
- "8761:8761" | ||
|
||
restfulservice: | ||
build: ./spring-boot-restful-service | ||
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 | ||
zipkin: | ||
build: ./zipkin-server | ||
ports: | ||
- "9411:9411" | ||
depends_on: | ||
- rabbitmq | ||
environment: | ||
RABBIT_HOST: rabbitmq | ||
|
||
web: | ||
build: ./spring-boot-webapp | ||
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" | ||
|
||
restfulservice: | ||
build: ./spring-boot-restful-service | ||
ports: | ||
- "8081:8080" | ||
depends_on: | ||
- rabbitmq | ||
- mongodb | ||
- eureka | ||
- zipkin | ||
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: | ||
build: ./spring-boot-webapp | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- restfulservice | ||
- zipkin | ||
- eureka | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM java:openjdk-8u91-jdk | ||
FROM openjdk:8u171-jre-alpine | ||
RUN apk --no-cache add curl | ||
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8761/health || exit 1 | ||
CMD java -jar eureka-server.jar --server.port=8761 | ||
EXPOSE 8080 | ||
EXPOSE 8761 | ||
COPY build/libs/eureka-server.jar . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#! /bin/bash | ||
|
||
docker run --rm --link microservicesexamples_mongodb_1:mongodb -i -t mongo:3.0.4 /usr/bin/mongo --host mongodb | ||
docker run --rm --network microservices-examples_default -i -t mongo:3.0.4 /usr/bin/mongo --host mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
curl -v -d '{"emailAddress": "foo@bar.com", "password" : "secret1234"}' -H "content-type: application/json" http://${DOCKER_HOST_IP}:8081/user | ||
curl -v -d "$(echo '{"emailAddress": "fooSUFFIX@bar.com", "password" : "secret1234"}' | sed -e "s/SUFFIX/$(date +%s)/")" -H "content-type: application/json" http://${DOCKER_HOST_IP}:8081/user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM java:openjdk-8u91-jdk | ||
FROM openjdk:8u171-jre-alpine | ||
RUN apk --no-cache add curl | ||
MAINTAINER [email protected] | ||
EXPOSE 8080 | ||
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/health || exit 1 | ||
CMD java -jar spring-boot-restful-service.jar | ||
ADD build/libs/spring-boot-restful-service.jar . | ||
COPY build/libs/spring-boot-restful-service.jar . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /bin/bash -e | ||
|
||
./gradlew assemble | ||
docker build -t sb_rest_svc . | ||
docker build -t spring-boot-restful-service . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM java:openjdk-8u91-jdk | ||
FROM openjdk:8u171-jre-alpine | ||
RUN apk --no-cache add curl | ||
MAINTAINER [email protected] | ||
EXPOSE 8080 | ||
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:8080/health || exit 1 | ||
CMD java -jar spring-boot-webapp.jar | ||
ADD build/libs/spring-boot-webapp.jar . | ||
COPY build/libs/spring-boot-webapp.jar . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#! /bin/bash -e | ||
|
||
./gradlew assemble | ||
docker build -t sb_web . | ||
docker build -t spring-boot-webapp . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
FROM java:openjdk-8u91-jdk | ||
FROM openjdk:8u171-jre-alpine | ||
RUN apk --no-cache add curl | ||
HEALTHCHECK --start-period=30s --interval=5s CMD curl -f http://localhost:9411 || exit 1 | ||
CMD java -jar zipkin-server.jar --server.port=9411 | ||
EXPOSE 8080 | ||
EXPOSE 9411 | ||
COPY build/libs/zipkin-server.jar . |