提交 55a2bcd6 authored 作者: chenhuan's avatar chenhuan

更新

上级 de796ae7
version: '3.7' version: "3.5"
services: services:
etcd: etcd:
container_name: etcd1 hostname: etcd1
image: bitnami/etcd:3 image: bitnami/etcd:3
ports: ports:
- "2379:2379" - "2379:2379"
- "2380:2380" - "2380:2380"
network_mode: "host" user: root
restart: always
stdin_open: true
tty: true
command: etcd --name etcd-srv1 --data-dir=/var/lib/etcd/ --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://10.0.5.16:2379 --initial-advertise-peer-urls http://10.0.5.16:2380 --listen-peer-urls http://0.0.0.0:2380 --initial-cluster-token etcd-cluster --initial-cluster "etcd-srv1=http://10.0.5.16:2380,etcd-srv2=http://10.0.5.15:2380" --initial-cluster-state new
volumes: volumes:
- /var/lib/etcd:/var/lib/etcd - "/var/docker/etcd/data:/opt/bitnami/etcd/data"
\ No newline at end of file environment:
- "ETCD_ADVERTISE_CLIENT_URLS=http://10.0.5.16:2379"
- "ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380"
- "ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.0.5.16:2380"
- "ALLOW_NONE_AUTHENTICATION=yes"
- "ETCD_INITIAL_CLUSTER=node1=http://10.0.5.16:2380,node2=http://10.0.5.15:2380"
- "ETCD_NAME=node1"
- "ETCD_DATA_DIR=/opt/bitnami/etcd/data"
networks:
- app-net
networks:
app-net:
name: app-net
\ No newline at end of file
version: '3.7' version: "3.5"
services: services:
etcd: etcd:
container_name: etcd2 hostname: etcd1
image: bitnami/etcd:3 image: bitnami/etcd:3
ports: ports:
- "2379:2379" - "2379:2379"
- "2380:2380" - "2380:2380"
network_mode: "host" user: root
restart: always
stdin_open: true
tty: true
command: etcd --name etcd-srv2 --data-dir=/var/lib/etcd/ --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://10.0.5.15:2379 --initial-advertise-peer-urls http://10.0.5.15:2380 --listen-peer-urls http://0.0.0.0:2380 --initial-cluster-token etcd-cluster --initial-cluster "etcd-srv1=http://10.0.5.16:2380,etcd-srv2=http://10.0.5.15:2380" --initial-cluster-state new
volumes: volumes:
- /var/lib/etcd:/var/lib/etcd - "/var/docker/etcd/data:/opt/bitnami/etcd/data"
\ No newline at end of file environment:
- "ETCD_ADVERTISE_CLIENT_URLS=http://10.0.5.15:2379"
- "ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380"
- "ETCD_INITIAL_ADVERTISE_PEER_URLS=http://10.0.5.15:2380"
- "ALLOW_NONE_AUTHENTICATION=yes"
- "ETCD_INITIAL_CLUSTER=node1=http://10.0.5.16:2380,node2=http://10.0.5.15:2380"
- "ETCD_NAME=node2"
- "ETCD_DATA_DIR=/opt/bitnami/etcd/data"
networks:
- app-net
networks:
app-net:
name: app-net
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论