blob: 04cb899e7dbad3df8c91d2070264a0cdc026183b [file] [log] [blame]
Richard Jankowskie4d77662018-10-17 13:53:21 -04001---
Joey Armstrong393daca2023-07-06 08:47:54 -04002# Copyright 2018-2023 Open Networking Foundation (ONF) and the ONF Contributors
Richard Jankowskie4d77662018-10-17 13:53:21 -04003# 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
17version: '2'
18services:
19 #
20 # Single-node etcd server
21 #
22 etcd:
Matt Jeannerete36a7552019-12-13 16:13:48 -050023 image: "quay.io/coreos/etcd:v3.4.1"
Richard Jankowskie4d77662018-10-17 13:53:21 -040024 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