Skip to content

Commit

Permalink
Merge pull request #34 from mmvega/master
Browse files Browse the repository at this point in the history
+ ADVERTISED_HOST env variable
  • Loading branch information
jonrobins authored Jul 6, 2018
2 parents 5c4ec80 + 5e158a2 commit fcacfcd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ In the above example the application would be accessible at the following addres

Note: the `registrationNetworkInterfacePriority` property allows the selection of the network interface when dynamically registering a service with ZooKeeper.

Note: if `registrationNetworkInterfacePriority` dont works for you you can set `ADVERTISED_HOST` enviroment variable.

If you would like to override the version which is exposed in the /info endpoint, just set the VERSION node env variable.

```sh
Expand Down
2 changes: 1 addition & 1 deletion lib/zoologist.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ ZoologistConfig.prototype.initialise = function(options) {
self.serviceInstance =
ServiceInstanceBuilder
.builder()
.address(self.getIpAddress())
.address(process.env.ADVERTISED_HOST ||self.getIpAddress())
.port(process.env.PORT || options.server.port)
.name(options.serviceName)
.build();
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fcacfcd

Please sign in to comment.