And etcd Similarly, consul is a highly available distributed kv system, and provide richer functionality than etcd, comes ui interface
consul mode with support end (client) and server mode (Server), deployed in a local client on each client machine in a practical deployment, server data synchronized to the client, the local client to interact directly with the service, effectively reduced network traffic
Build consul services
version: "3.5"
services:
consul:
hostname: consul
image: consul:1.6.1
deploy:
replicas: 1
restart_policy:
condition: on-failure
# ports:
# - "8500:8500"
# - "8600:8600"
user: root
volumes:
- "/var/docker/consul/data:/consul/data"
environment:
- CONSUL_BOOTSTRAP_EXPECT=1
- CONSUL_CLIENT_LAN_ADDRESS=0.0.0.0
- CONSUL_ENABLE_UI=true
- CONSUL_ENABLE_SERVER=true
networks:
- consulnet
networks:
consulnet:
name: consulnet
After successful deployment, you can http://127.0.0.1:8500/ui/
access consul ui
link
- github consul: https://github.com/hashicorp/consul
- docker consul Mirror: https://hub.docker.com/_/consul
- docker consul github: https://github.com/hashicorp/docker-consul
- Reference Code: https://github.com/hpifu/docker-consul
- docker consul Cluster Reference: https://github.com/bitnami/bitnami-docker-consul/blob/master/docker-compose-cluster.yml
Please indicate the source article link: https://tech.hatlonely.com/article/63