You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/08/24 12:55:00 UTC

cxf git commit: Some docker network related updates for spring_boot_scan

Repository: cxf
Updated Branches:
  refs/heads/master 172579c62 -> 47192c083


Some docker network related updates for spring_boot_scan


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/47192c08
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/47192c08
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/47192c08

Branch: refs/heads/master
Commit: 47192c08378c1446d670d806a84c187765c41be9
Parents: 172579c
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Thu Aug 24 13:54:45 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Thu Aug 24 13:54:45 2017 +0100

----------------------------------------------------------------------
 .../main/release/samples/jax_rs/spring_boot_scan/README  | 10 +++++++++-
 .../samples/jax_rs/spring_boot_scan/application/README   | 11 +++++++++++
 .../application/src/main/resources/application.yml       |  3 ++-
 .../samples/jax_rs/spring_boot_scan/docker-compose.yml   |  7 ++++++-
 4 files changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/47192c08/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
index e8b8960..7822817 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/README
@@ -7,7 +7,15 @@ Check eureka-registry/README on how to run Eureka Registry.
 
 Check application/README on how to run a server application.
 
-Note: you can have both the registry and the server application started by running "docker-compose up" in this directory. 
+Note: 
+You can have both the registry and the server application started by running "docker-compose up" in this directory.
+
+By default it is expected that EUREKA_SERVER_URI environment variable is exported and set to 
+"http://{docker.host}" where you can find the value of {docker.host} by running 'ifconfig' and checking 
+the IP address of the docker bridge 'docker0'.
+
+Alternatively you can edit docker-compose.yml and enable the 'host' network mode.
+ 
 
 Check client/README on how to run a command line client.
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/47192c08/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
index d083b16..7faebf6 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/README
@@ -37,8 +37,19 @@ $ mvn dockerfile:push
 --
 
 Run the container:
+
+By default it is expected that EUREKA_SERVER_URI environment variable is passed and set to 
+"http://{docker.host}" where you can find the value of {docker.host} by running 'ifconfig' and checking 
+the IP address of the docker bridge 'docker0'.
+
+--
+docker run -p 8080:8080 -e EUREKA_SERVER_URI='http://{docker.host}' -t ${username}/apachecxf:spring-boot-sample-rs-scan-app 
+--
+
+Alternatively you can run the docker in the 'host' network mode.
 --
 docker run -p 8080:8080 --network="host" -t ${username}/apachecxf:spring-boot-sample-rs-scan-app 
+--
 
 = Testing the server =
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/47192c08/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
index 4b31362..2ea2b07 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
@@ -16,8 +16,9 @@ eureka:
   client:
     registerWithEureka: true
     serviceUrl:
-      defaultZone: ${EUREKA_SERVER_URI:http://${EUREKA_SERVER_USER:}:${EUREKA_SERVER_PASS:}@127.0.0.1:8761}/eureka/
+      defaultZone: ${EUREKA_SERVER_URI:http://127.0.0.1}:${EUREKA_SERVER_PORT:8761}/eureka/
   instance:
+    prefer-ip-address: true
     statusPageUrlPath: /services/helloservice/info
     healthCheckUrlPath: /system/health
     metadataMap:

http://git-wip-us.apache.org/repos/asf/cxf/blob/47192c08/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
index c468450..f5b57d5 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/docker-compose.yml
@@ -6,8 +6,13 @@ services:
       - "8761:8761"
   jaxrs:
     image: $USER/apachecxf:spring-boot-sample-rs-scan-app
+    environment:
+      - EUREKA_SERVER_URI
     ports:
       - "8080:8080"
-    network_mode: "host" 
+#   Use this mode only if you'd like Eureka client to use 127.0.0.1
+#   instead of exporting EUREKA_SERVER_URI env variable   
+# 
+#    network_mode: "host"