2021-11-26 06:08:48 +02:00
|
|
|
# https://etcd.io/docs/v3.5/op-guide/container/
|
2020-05-21 09:14:29 +02:00
|
|
|
|
|
|
|
version: "3.8"
|
|
|
|
services:
|
|
|
|
etcd:
|
2021-11-26 06:08:48 +02:00
|
|
|
image: quay.io/coreos/etcd:v3.5.1
|
2020-05-21 09:14:29 +02:00
|
|
|
command: >
|
|
|
|
etcd --name=node1
|
|
|
|
--data-dir=/data
|
|
|
|
--initial-advertise-peer-urls=http://1.2.3.4:2380
|
|
|
|
--listen-peer-urls=http://0.0.0.0:2380
|
|
|
|
--advertise-client-urls=http://1.2.3.4:2379
|
|
|
|
--listen-client-urls=http://0.0.0.0:2379
|
|
|
|
--initial-cluster=node1=http://1.2.3.4:2380
|
2021-11-26 06:08:48 +02:00
|
|
|
--initial-cluster-token=my-etcd-token
|
2020-05-21 09:14:29 +02:00
|
|
|
ports:
|
|
|
|
- "2379:2379"
|
|
|
|
- "2380:2380"
|
|
|
|
volumes:
|
|
|
|
- ./data:/data
|
2021-11-26 06:08:48 +02:00
|
|
|
environment:
|
|
|
|
- ETCDCTL_API=3
|
|
|
|
- ETCD_LOGGER=zap
|
|
|
|
- ETCD_LOG_LEVEL=info
|
|
|
|
- ETCD_LOG_OUTPUTS=/data/etcd.log
|
|
|
|
- ETCD_ENABLE_LOG_ROTATION=true
|
2020-05-21 09:14:29 +02:00
|
|
|
restart: unless-stopped
|