Skip to content

Commit f5e5ee8

Browse files
committed
Make example consistent by using .env file
1 parent c4d2a2f commit f5e5ee8

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

docs/en/getting-started/docker/docker-compose.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2.2'
22
services:
33
es01:
4-
image: docker.elastic.co/elasticsearch/elasticsearch:{version}
4+
image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION}
55
container_name: es01
66
environment:
77
- node.name=es01
@@ -22,7 +22,7 @@ services:
2222
- elastic
2323

2424
es02:
25-
image: docker.elastic.co/elasticsearch/elasticsearch:{version}
25+
image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION}
2626
container_name: es02
2727
environment:
2828
- node.name=es02
@@ -41,7 +41,7 @@ services:
4141
- elastic
4242

4343
es03:
44-
image: docker.elastic.co/elasticsearch/elasticsearch:{version}
44+
image: docker.elastic.co/elasticsearch/elasticsearch:${VERSION}
4545
container_name: es03
4646
environment:
4747
- node.name=es03
@@ -60,7 +60,7 @@ services:
6060
- elastic
6161

6262
kib01:
63-
image: docker.elastic.co/kibana/kibana:{version}
63+
image: docker.elastic.co/kibana/kibana:${VERSION}
6464
container_name: kib01
6565
ports:
6666
- 5601:5601

docs/en/getting-started/get-started-docker.asciidoc

+9-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the {stack}: https://www.docker.elastic.co/.
1111
To get the default distributions of {es} and {kib} up and running in Docker,
1212
you can use Docker Compose.
1313

14-
. Create a `docker-compose.yml` file for the Elastic Stack.
14+
. Create an `.env` and `docker-compose.yml` file for the Elastic Stack.
1515
The following example brings up a three node cluster and Kibana so you can see how things work.
1616
This all-in-one configuration is a handy way to bring up your first dev cluster before
1717
you build a distributed deployment with multiple hosts.
@@ -22,6 +22,14 @@ so the sample compose file is not yet available for this version.
2222
See the {stack-gs-current}/get-started-docker.html[current version] for the latest sample files.
2323
endif::[]
2424
ifeval::["{release-state}"!="unreleased"]
25+
`.env`:
26+
["source","txt",subs="attributes"]
27+
----
28+
COMPOSE_PROJECT_NAME=es
29+
VERSION={version}
30+
----
31+
32+
`.docker-compose.yml`:
2533
["source","yaml",subs="attributes"]
2634
--------------------------------------------
2735
include::docker/docker-compose.yml[]

0 commit comments

Comments
 (0)