https://github.com/alextanhongpin/consul-docker-compose
Running a three node cluster for consul using docker compose and service registration with nodejs
https://github.com/alextanhongpin/consul-docker-compose
consul docker-compose
Last synced: about 1 month ago
JSON representation
Running a three node cluster for consul using docker compose and service registration with nodejs
- Host: GitHub
- URL: https://github.com/alextanhongpin/consul-docker-compose
- Owner: alextanhongpin
- Created: 2017-07-09T05:08:04.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-09T05:19:12.000Z (almost 9 years ago)
- Last Synced: 2025-01-29T21:54:23.049Z (over 1 year ago)
- Topics: consul, docker-compose
- Language: JavaScript
- Size: 2.93 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nodejs-consul
Using Consul for service discovery.
## Docker
Get the latest version of Consul with the following command:
```bash
$ docker pull consul
```
Running a three node cluster for development by starting up two more instances and telling them to join the first node.
```bash
# Setup the consul
$ docker-compose up -d
# Register the service on the server side
$ cd ./server && node server.js
# Listen to the changes of the registered service
$ cd ./client && node client.js
```
### UI
For displaying the ui, the following is needed
```bash
$ ... -ui -client=0.0.0.0 -bind='{{ GetPrivateIP }}'
```