Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Make example consistent by using .env file #1759

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/en/getting-started/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 9 additions & 1 deletion docs/en/getting-started/get-started-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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[]
Expand Down