237
$IP : yout consul agent's ip. If you do not specify any ip 192.168.33.10.
We are using Registrator to sync services on our consul cluster. To add services from consul to nginx run contains provided with service tag: ##sudo docker run -p 80:80 -d -e "SERVICE_TAGS=service" --name nginx microservicedockerfiles/nginxconsul "$IP"
Have to add ** -e "SERVICE_TAGS=service"** to every container your nginx should keep track of.
If you run on raw consul and register over rest api, you can provide the service tag in the consul Tags array. https://www.consul.io/docs/agent/http/catalog.html#catalog_register
Consul template registers on the consul agent passed with $IP. Every change triggers an refresh over nginx, updating the nginx index page, and the proxy options. serverip:port shows the ingex pages, if one or more services are registert with the service tag. serverip:port/server/$servicename provides one $servicename service with round robin.
Content type
Unrecognized
Digest
Size
88 MB
Last updated
about 10 years ago
docker pull microservicedockerfiles/nginxconsul