blob: 9c11c3c097dfef6f78a12ad1b7b9068f5117a842 [file] [log] [blame]
Richard Jankowskie4d77662018-10-17 13:53:21 -04001---
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
16version: '2'
17services:
18 #
19 # Single-node etcd server
20 #
21 etcd:
Matt Jeannerete36a7552019-12-13 16:13:48 -050022 image: "quay.io/coreos/etcd:v3.4.1"
Richard Jankowskie4d77662018-10-17 13:53:21 -040023 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