docker-compose安装部署consul

version: "3.4"

services:
  consul:
    image: docker.das-security.cn/middleware/consul:1.15
    container_name: consul
    volumes:
      - /etc/localtime:/etc/localtime
      - ./configs/consul/acl.json:/consul/acl/acl.json
      - ../volumes/consul/data:/consul/data
    restart: always
    command: agent -server -ui -node=n1 -bootstrap-expect=1 -client=0.0.0.0 -bind=0.0.0.0 -config-dir=/consul/acl/acl.json
    ports:
      - 8500:8500

acl.json

{
    "acl": {
        "enabled": true,
        "default_policy": "deny",
        "enable_token_persistence": true,
        "tokens": {
            "master": "08628f2918744387b03b5249f0daeb1b",
            "agent": "08628f2918744387b03b5249f0daeb1b"
        }
    }
}
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐