Ajay Sabarish
Ajay Sabarish

Reputation: 71

How to join a consul client to consul server running in docker container through Node.js Consul client?

I am new to Consul.

I have a consul docker container running in server mode as a part of the docker-compose environment. I have various microservices running in the same environment which need to be registered with Consul.

My Approach :

  1. Register the service with Consul Agent local to the microservice through Node.js Consul client

  2. Join the consul client to the consul server running in docker-compose

How do I execute step 2?

Upvotes: 0

Views: 500

Answers (1)

Derek Strickland
Derek Strickland

Reputation: 31

Have you set the retry_join option as either a parameter to the CLI command or in the agent config file? That's how you tell a consul client where to go to join the mesh.

Upvotes: 0

Related Questions