From f5e5ee89ac157fb88e6225aeab77d0d74c351a1a Mon Sep 17 00:00:00 2001 From: Wesley Yarde Date: Wed, 21 Jul 2021 16:25:35 +0200 Subject: [PATCH] Make example consistent by using .env file --- docs/en/getting-started/docker/docker-compose.yml | 8 ++++---- docs/en/getting-started/get-started-docker.asciidoc | 10 +++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/en/getting-started/docker/docker-compose.yml b/docs/en/getting-started/docker/docker-compose.yml index 5537943589..e51249aba1 100644 --- a/docs/en/getting-started/docker/docker-compose.yml +++ b/docs/en/getting-started/docker/docker-compose.yml @@ -1,7 +1,7 @@ version: '2.2' services: es01: - image: docker.elastic.co/elasticsearch/elasticsearch:{version} + image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION} container_name: es01 environment: - node.name=es01 @@ -22,7 +22,7 @@ services: - elastic es02: - image: docker.elastic.co/elasticsearch/elasticsearch:{version} + image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION} container_name: es02 environment: - node.name=es02 @@ -41,7 +41,7 @@ services: - elastic es03: - image: docker.elastic.co/elasticsearch/elasticsearch:{version} + image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION} container_name: es03 environment: - node.name=es03 @@ -60,7 +60,7 @@ services: - elastic kib01: - image: docker.elastic.co/kibana/kibana:{version} + image: docker.elastic.co/kibana/kibana:${VERSION} container_name: kib01 ports: - 5601:5601 diff --git a/docs/en/getting-started/get-started-docker.asciidoc b/docs/en/getting-started/get-started-docker.asciidoc index 732e32c303..8bcc1b42dc 100644 --- a/docs/en/getting-started/get-started-docker.asciidoc +++ b/docs/en/getting-started/get-started-docker.asciidoc @@ -11,7 +11,7 @@ the {stack}: https://www.docker.elastic.co/. To get the default distributions of {es} and {kib} up and running in Docker, you can use Docker Compose. -. Create a `docker-compose.yml` file for the Elastic Stack. +. Create an `.env` and `docker-compose.yml` file for the Elastic Stack. The following example brings up a three node cluster and Kibana so you can see how things work. This all-in-one configuration is a handy way to bring up your first dev cluster before you build a distributed deployment with multiple hosts. @@ -22,6 +22,14 @@ so the sample compose file is not yet available for this version. See the {stack-gs-current}/get-started-docker.html[current version] for the latest sample files. endif::[] ifeval::["{release-state}"!="unreleased"] +`.env`: +["source","txt",subs="attributes"] +---- +COMPOSE_PROJECT_NAME=es +VERSION={version} +---- + +`.docker-compose.yml`: ["source","yaml",subs="attributes"] -------------------------------------------- include::docker/docker-compose.yml[]