mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-16 11:58:47 +00:00
update etcd
This commit is contained in:
parent
c20ccd5a85
commit
4961cd416d
@ -4,4 +4,17 @@ etcd
|
|||||||
[etcd][1] is a distributed, reliable key-value store for the most critical data
|
[etcd][1] is a distributed, reliable key-value store for the most critical data
|
||||||
of a distributed system.
|
of a distributed system.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker-compose up -d
|
||||||
|
$ docker-compose exec etcd bash
|
||||||
|
>>> etcdctl version
|
||||||
|
etcdctl version: 3.5.1
|
||||||
|
API version: 3.5
|
||||||
|
>>> etcdctl put foo bar
|
||||||
|
OK
|
||||||
|
>>> etcdctl gut foo
|
||||||
|
foo
|
||||||
|
bar
|
||||||
|
```
|
||||||
|
|
||||||
[1]: https://etcd.io/
|
[1]: https://etcd.io/
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# https://etcd.io/docs/v3.4.0/op-guide/container/
|
# https://etcd.io/docs/v3.5/op-guide/container/
|
||||||
|
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
etcd:
|
etcd:
|
||||||
image: quay.io/coreos/etcd:v3.4.8
|
image: quay.io/coreos/etcd:v3.5.1
|
||||||
command: >
|
command: >
|
||||||
etcd --name=node1
|
etcd --name=node1
|
||||||
--data-dir=/data
|
--data-dir=/data
|
||||||
@ -12,9 +12,16 @@ services:
|
|||||||
--advertise-client-urls=http://1.2.3.4:2379
|
--advertise-client-urls=http://1.2.3.4:2379
|
||||||
--listen-client-urls=http://0.0.0.0:2379
|
--listen-client-urls=http://0.0.0.0:2379
|
||||||
--initial-cluster=node1=http://1.2.3.4:2380
|
--initial-cluster=node1=http://1.2.3.4:2380
|
||||||
|
--initial-cluster-token=my-etcd-token
|
||||||
ports:
|
ports:
|
||||||
- "2379:2379"
|
- "2379:2379"
|
||||||
- "2380:2380"
|
- "2380:2380"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./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
|
restart: unless-stopped
|
||||||
|
Loading…
Reference in New Issue
Block a user