diff --git a/README.md b/README.md
index 7492151..e0c325e 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,6 @@ CQRS, REST, Web Sockets, Continuous deploy with Jenkins, and all developed using
* run package-projects.sh
* run docker-orchestrate.sh
-* docker-compose -f infra-docker-compose.yml -p todo up (wait until all services be up)
* docker-compose -p todo up
## Continuous deploy using Jenkins Pipeline
@@ -44,9 +43,9 @@ and paste the content of the Jenkinsfile in the Pipeline script box. Have a look
to check how to work with Jenkins pipeline
### Accessing the services
-* Authenticate -> curl -X POST -vu todo-app:123456 http://localhost:8017/oauth/token -H "Accept: application/json" -d "password=1234&username=apssouza22@gmail.com&grant_type=password&scope=write&client_secret=123456&client_id=todo-app"
+* Authenticate -> ```curl -X POST -vu todo-app:123456 http://localhost:8017/oauth/token -H "Accept: application/json" -d "password=1234&username=apssouza22@gmail.com&grant_type=password&scope=write&client_secret=123456&client_id=todo-app"```
-* Get data using the access_token -> localhost:8018/accounts?access_token={access_token} or curl -H "Authorization: Bearer $TOKEN" "localhost:8018/path"
+* Get data using the access_token -> `localhost:8018/accounts?access_token={access_token}` or `curl -H "Authorization: Bearer $TOKEN" "localhost:8018/path"`
### Scaling
NGINX will be configured for browser caching of the static content and Load balance. For that we will need to scale our App Gateway
@@ -104,7 +103,7 @@ curl -d '{"userEmail":"alex@test.com", "caption":"post caption", "description":"
```
# running separated container and link to the network infrastructure
-docker run -d -p 8026:8026 --network todo_net --add-host eureka:172.19.0.3 todo/admin-server
+docker run -d -p 8018:8018 --network todo_net --add-host eureka:172.19.0.5 --add-host config:172.19.0.2 todo/reminder-service
# orchestrate start-up of containers, tailing the logs...
docker-compose -p music up -d container-name && docker logs elk --follow # ^C to break
diff --git a/api-gateway/pom.xml b/api-gateway/pom.xml
index c87019b..1ecc1cc 100644
--- a/api-gateway/pom.xml
+++ b/api-gateway/pom.xml
@@ -101,11 +101,6 @@
org.springframework.security
spring-security-jwt
-
- de.codecentric
- spring-boot-admin-starter-client
- 1.5.4
-
com.h2database
diff --git a/event-docker-compose.yml b/assets/event-docker-compose.yml
similarity index 100%
rename from event-docker-compose.yml
rename to assets/event-docker-compose.yml
diff --git a/infra-docker-compose.yml b/assets/infra-docker-compose.yml
similarity index 100%
rename from infra-docker-compose.yml
rename to assets/infra-docker-compose.yml
diff --git a/logging-docker-compose.yml b/assets/logging-docker-compose.yml
similarity index 100%
rename from logging-docker-compose.yml
rename to assets/logging-docker-compose.yml
diff --git a/oauth-docker-compose.yml b/assets/oauth-docker-compose.yml
similarity index 100%
rename from oauth-docker-compose.yml
rename to assets/oauth-docker-compose.yml
diff --git a/proxy-docker-compose.yml b/assets/proxy-docker-compose.yml
similarity index 100%
rename from proxy-docker-compose.yml
rename to assets/proxy-docker-compose.yml
diff --git a/config-server/pom.xml b/config-server/pom.xml
index 171d4b3..f453e43 100644
--- a/config-server/pom.xml
+++ b/config-server/pom.xml
@@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.test
+ com.apssouza
config-server
1
jar
@@ -42,7 +42,7 @@
spring-boot-devtools
true
-
+
diff --git a/config-server/src/main/resources/application.yml b/config-server/src/main/resources/application.yml
index 5b5ec4b..a6eb1ee 100644
--- a/config-server/src/main/resources/application.yml
+++ b/config-server/src/main/resources/application.yml
@@ -2,6 +2,8 @@
spring.profiles.active: native
spring.application.name: config-server
server.port: 8888
+eureka.client.serviceUrl.defaultZone : http://eureka:8010/eureka/,http://localhost:8011/eureka/
+
spring:
cloud:
config:
@@ -12,3 +14,5 @@ spring:
# "native" is used when the native profile is active, for local tests with a classpath repo:
native:
searchLocations: classpath:offline-repository/
+
+
diff --git a/docker-compose.yml b/docker-compose.yml
index c4c457e..261f3be 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -121,7 +121,47 @@ services:
command: ["./wait-for-it.sh","eureka:8010","--timeout=150","--","/usr/local/bin/start.sh"]
external_links:
- elk
+
+ zookeeper:
+ image: wurstmeister/zookeeper
+ ports:
+ - 2181:2181
+ networks:
+ - net
+ mem_limit: 925288000
+ cpu_shares: 100
+
+ kafka:
+ image: wurstmeister/kafka
+ ports:
+ - 9092
+ depends_on:
+ - zookeeper
+ environment:
+ KAFKA_ADVERTISED_HOST_NAME: 172.19.0.1
+ KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
+ KAFKA_CREATE_TOPICS: "todo-mail:1:1"
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ hostname: kafka
+ container_name: kafka
+ networks:
+ - net
+ mem_limit: 925288000
+ cpu_shares: 100
+ proxy:
+ build: proxy/
+ ports:
+ - 8055:80
+ networks:
+ - net
+ depends_on:
+ - gateway
+ hostname: proxy
+ container_name: proxy
+ command: ["./wait-for-it.sh","gateway:8018","--timeout=50","--","/usr/local/bin/start.sh"]
+
volumes:
todo_data:
external: true
diff --git a/docker-orchestrate.sh b/docker-orchestrate.sh
old mode 100644
new mode 100755
diff --git a/oauth-server/pom.xml b/oauth-server/pom.xml
index b3e6f71..b25e918 100644
--- a/oauth-server/pom.xml
+++ b/oauth-server/pom.xml
@@ -95,12 +95,6 @@
test
-
- de.codecentric
- spring-boot-admin-starter-client
- 1.5.4
-
-
org.springframework.cloud
spring-cloud-starter-config
diff --git a/remainder-service/pom.xml b/remainder-service/pom.xml
index ba77f71..4e77cb2 100644
--- a/remainder-service/pom.xml
+++ b/remainder-service/pom.xml
@@ -25,12 +25,6 @@
-
- de.codecentric
- spring-boot-admin-starter-client
- 1.3.4
-
-
org.springframework.boot
spring-boot-starter-websocket
diff --git a/user-service/pom.xml b/user-service/pom.xml
index b0e4797..1b97317 100644
--- a/user-service/pom.xml
+++ b/user-service/pom.xml
@@ -38,11 +38,6 @@
-
- de.codecentric
- spring-boot-admin-starter-client
- 1.3.4
-
org.springframework.boot
spring-boot-starter