Richard Jankowski | e4d7766 | 2018-10-17 13:53:21 -0400 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2018 the original author or authors. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | version: '2' |
| 17 | services: |
| 18 | # |
| 19 | # Single-node etcd server |
| 20 | # |
| 21 | etcd: |
Matt Jeanneret | e36a755 | 2019-12-13 16:13:48 -0500 | [diff] [blame] | 22 | image: "quay.io/coreos/etcd:v3.4.1" |
Richard Jankowski | e4d7766 | 2018-10-17 13:53:21 -0400 | [diff] [blame] | 23 | command: [ |
| 24 | "etcd", |
| 25 | "--name=etcd0", |
| 26 | "--advertise-client-urls=http://${DOCKER_HOST_IP}:2379,http://${DOCKER_HOST_IP}:4001", |
| 27 | "--listen-client-urls=http://0.0.0.0:2379,http://0.0.0.0:4001", |
| 28 | "--initial-advertise-peer-urls=http://${DOCKER_HOST_IP}:2380", |
| 29 | "--listen-peer-urls=http://0.0.0.0:2380", |
| 30 | "--initial-cluster-token=etcd-cluster-1", |
| 31 | "--initial-cluster=etcd0=http://${DOCKER_HOST_IP}:2380", |
| 32 | "--initial-cluster-state=new" |
| 33 | ] |
| 34 | ports: |
| 35 | - "2379:2379" |
| 36 | - 2380 |
| 37 | - 4001 |
| 38 | |