Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swade1987/7bd23e91cc187c79101d79c67634e101 to your computer and use it in GitHub Desktop.
Save swade1987/7bd23e91cc187c79101d79c67634e101 to your computer and use it in GitHub Desktop.
sudo docker run -d --name consul \
-p $host_ip:8300:8300 \
-p $host_ip:8301:8301 \
-p $host_ip:8301:8301/udp \
-p $host_ip:8302:8302 \
-p $host_ip:8302:8302/udp \
-p $host_ip:8400:8400 \
-p $host_ip:8500:8500 \
-e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true}' \
consul agent \
-server \
-ui \
-client=0.0.0.0 \
-bootstrap-expect $bootstrap_expect
-advertise $host_ip \
-retry-join ${consul_server_1} \
-retry-join ${consul_server_2} \
-retry-join ${consul_server_3} \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment