Skip to content

Commit 8a219ea

Browse files
Merge pull request #122 from BendingBender/allow-changing-image-names
Introduce variables for all used docker images
2 parents fd7f419 + 38bc18b commit 8a219ea

File tree

6 files changed

+25
-12
lines changed

6 files changed

+25
-12
lines changed

.env

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
COMPOSE_PROJECT_NAME=elastic
22
ELK_VERSION=8.10.2
33

4+
#----------- Images to use ----------------------#
5+
6+
# the following images will be appended with the ELK_VERSION version number
7+
ELASTICSEARCH_IMAGE_NAME=elastdocker/elasticsearch
8+
LOGSTASH_IMAGE_NAME=elastdocker/logstash
9+
KIBANA_IMAGE_NAME=elastdocker/kibana
10+
APM_SERVER_IMAGE_NAME=elastdocker/apm-server
11+
FILEBEAT_IMAGE_NAME=docker.elastic.co/beats/filebeat
12+
13+
# the following images will be used as is
14+
ELASTICSEARCH_EXPORTER_IMAGE=justwatch/elasticsearch_exporter:1.1.0
15+
LOGSTASH_EXPORTER_IMAGE=alxrem/prometheus-logstash-exporter
16+
417
#----------- Resources --------------------------#
518
ELASTICSEARCH_HEAP=1024m
619
LOGSTASH_HEAP=512m

docker-compose.logs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ volumes:
77
services:
88
# Docker Logs Shipper ------------------------------
99
filebeat:
10-
image: docker.elastic.co/beats/filebeat:${ELK_VERSION}
10+
image: ${FILEBEAT_IMAGE_NAME}:${ELK_VERSION}
1111
restart: always
1212
# -e flag to log to stderr and disable syslog/file output
1313
command: -e --strict.perms=false

docker-compose.monitor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44

55
# Prometheus Exporters ------------------------------
66
elasticsearch-exporter:
7-
image: justwatch/elasticsearch_exporter:1.1.0
7+
image: ${ELASTICSEARCH_EXPORTER_IMAGE}
88
restart: always
99
command: ["--es.uri", "https://${ELASTIC_USERNAME}:${ELASTIC_PASSWORD}@${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}",
1010
"--es.ssl-skip-verify",
@@ -15,15 +15,15 @@ services:
1515
- "9114:9114"
1616

1717
logstash-exporter:
18-
image: alxrem/prometheus-logstash-exporter
18+
image: ${LOGSTASH_EXPORTER_IMAGE}
1919
restart: always
2020
ports:
2121
- "9304:9304"
2222
command: ["-logstash.host", "${LOGSTASH_HOST}"]
2323

2424
# Cluster Logs Shipper ------------------------------
2525
filebeat-cluster-logs:
26-
image: docker.elastic.co/beats/filebeat:${ELK_VERSION}
26+
image: ${FILEBEAT_IMAGE_NAME}:${ELK_VERSION}
2727
restart: always
2828
# -e flag to log to stderr and disable syslog/file output
2929
command: -e --strict.perms=false

docker-compose.nodes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ volumes:
77

88
services:
99
elasticsearch-1:
10-
image: elastdocker/elasticsearch:${ELK_VERSION}
10+
image: ${ELASTICSEARCH_IMAGE_NAME}:${ELK_VERSION}
1111
build:
1212
context: elasticsearch/
1313
args:
@@ -44,7 +44,7 @@ services:
4444
soft: 200000
4545
hard: 200000
4646
elasticsearch-2:
47-
image: elastdocker/elasticsearch:${ELK_VERSION}
47+
image: ${ELASTICSEARCH_IMAGE_NAME}:${ELK_VERSION}
4848
build:
4949
context: elasticsearch/
5050
args:

docker-compose.setup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3.5'
22

33
services:
44
keystore:
5-
image: elastdocker/elasticsearch:${ELK_VERSION}
5+
image: ${ELASTICSEARCH_IMAGE_NAME}:${ELK_VERSION}
66
build:
77
context: elasticsearch/
88
args:
@@ -16,7 +16,7 @@ services:
1616
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
1717

1818
certs:
19-
image: elastdocker/elasticsearch:${ELK_VERSION}
19+
image: ${ELASTICSEARCH_IMAGE_NAME}:${ELK_VERSION}
2020
build:
2121
context: elasticsearch/
2222
args:

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ secrets:
3232

3333
services:
3434
elasticsearch:
35-
image: elastdocker/elasticsearch:${ELK_VERSION}
35+
image: ${ELASTICSEARCH_IMAGE_NAME}:${ELK_VERSION}
3636
build:
3737
context: elasticsearch/
3838
args:
@@ -77,7 +77,7 @@ services:
7777
test: ["CMD", "sh", "-c", "curl -sf --insecure https://$ELASTIC_USERNAME:$ELASTIC_PASSWORD@localhost:$ELASTICSEARCH_PORT/_cat/health | grep -ioE 'green|yellow' || echo 'not green/yellow cluster status'"]
7878

7979
logstash:
80-
image: elastdocker/logstash:${ELK_VERSION}
80+
image: ${LOGSTASH_IMAGE_NAME}:${ELK_VERSION}
8181
build:
8282
context: logstash/
8383
args:
@@ -102,7 +102,7 @@ services:
102102
test: ["CMD", "curl", "-s" ,"-XGET", "http://127.0.0.1:9600"]
103103

104104
kibana:
105-
image: elastdocker/kibana:${ELK_VERSION}
105+
image: ${KIBANA_IMAGE_NAME}:${ELK_VERSION}
106106
build:
107107
context: kibana/
108108
args:
@@ -128,7 +128,7 @@ services:
128128
- "${KIBANA_PORT}:${KIBANA_PORT}"
129129

130130
apm-server:
131-
image: elastdocker/apm-server:${ELK_VERSION}
131+
image: ${APM_SERVER_IMAGE_NAME}:${ELK_VERSION}
132132
build:
133133
context: apm-server/
134134
args:

0 commit comments

Comments
 (0)