26 lines
732 B
YAML
26 lines
732 B
YAML
version: '3.3'
|
|
|
|
services:
|
|
create_certs:
|
|
container_name: create_certs
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
|
|
command: >
|
|
bash -c '
|
|
if [[ ! -f /certs/bundle.zip ]]; then
|
|
bin/elasticsearch-certutil cert --silent --pem --in config/certificates/instances.yml -out /certs/bundle.zip;
|
|
unzip /certs/bundle.zip -d /certs;
|
|
fi;
|
|
chown -R 1000:0 /certs
|
|
'
|
|
user: "0"
|
|
working_dir: /usr/share/elasticsearch
|
|
volumes: ['es-certs:/certs', '.:/usr/share/elasticsearch/config/certificates']
|
|
|
|
volumes:
|
|
es-certs:
|
|
driver: local
|
|
driver_opts:
|
|
o: bind
|
|
type: none
|
|
device: /data/container_volumes/es-certs
|