1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/etcd/docker-compose.yml
2024-10-14 19:03:43 +08:00

28 lines
801 B
YAML

# https://etcd.io/docs/v3.5/op-guide/container/
version: "3.8"
services:
etcd:
image: gcr.io/etcd-development/etcd:v3.5.16
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
--initial-cluster-token=my-etcd-token
ports:
- "2379:2379"
- "2380:2380"
volumes:
- ./data:/data
environment:
- ETCDCTL_API=3
- ETCD_LOGGER=zap
- ETCD_LOG_LEVEL=info
- ETCD_LOG_OUTPUTS=/data/etcd.log
- ETCD_ENABLE_LOG_ROTATION=true
restart: unless-stopped