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