Created
December 9, 2020 04:48
-
-
Save tsonglew/725c6cfd56d3ee2ea15b66298eae1304 to your computer and use it in GitHub Desktop.
etcd docker compose file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
etcd1: | |
image: "quay.io/coreos/etcd:v3.4.7" | |
entrypoint: /usr/local/bin/etcd | |
command: | |
- '--name=etcd1' | |
- '--data-dir=/etcd_data' | |
- '--initial-advertise-peer-urls=http://etcd1:2380' | |
- '--listen-peer-urls=http://0.0.0.0:2380' | |
- '--listen-client-urls=http://0.0.0.0:2379' | |
- '--advertise-client-urls=http://etcd1:2379' | |
- '--initial-cluster-token=mys1cr2tt1k7n' | |
- '--heartbeat-interval=250' | |
- '--election-timeout=1250' | |
- '--initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380' | |
- '--initial-cluster-state=new' | |
ports: | |
- 2379 | |
volumes: | |
- ./store/etcd1/data:/etcd_data | |
etcd2: | |
image: "quay.io/coreos/etcd:v3.4.7" | |
entrypoint: /usr/local/bin/etcd | |
command: | |
- '--name=etcd2' | |
- '--data-dir=/etcd_data' | |
- '--initial-advertise-peer-urls=http://etcd2:2380' | |
- '--listen-peer-urls=http://0.0.0.0:2380' | |
- '--listen-client-urls=http://0.0.0.0:2379' | |
- '--advertise-client-urls=http://etcd2:2379' | |
- '--initial-cluster-token=mys1cr2tt1k7n' | |
- '--heartbeat-interval=250' | |
- '--election-timeout=1250' | |
- '--initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380' | |
- '--initial-cluster-state=new' | |
ports: | |
- 2379 | |
volumes: | |
- ./store/etcd2/data:/etcd_data | |
etcd3: | |
image: "quay.io/coreos/etcd:v3.4.7" | |
entrypoint: /usr/local/bin/etcd | |
command: | |
- '--name=etcd3' | |
- '--data-dir=/etcd_data' | |
- '--initial-advertise-peer-urls=http://etcd3:2380' | |
- '--listen-peer-urls=http://0.0.0.0:2380' | |
- '--listen-client-urls=http://0.0.0.0:2379' | |
- '--advertise-client-urls=http://etcd3:2379' | |
- '--initial-cluster-token=mys1cr2tt1k7n' | |
- '--heartbeat-interval=250' | |
- '--election-timeout=1250' | |
- '--initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380' | |
- '--initial-cluster-state=new' | |
ports: | |
- 2379 | |
volumes: | |
- ./store/etcd3/data:/etcd_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment