Skip to content

Instantly share code, notes, and snippets.

View sherifabdlnaby's full-sized avatar

Sherif Abdel-Naby sherifabdlnaby

View GitHub Profile
version: '3.5'
services:
keystore:
build:
context: elasticsearch/
args:
ELK_VERSION: ${ELK_VERSION}
command: bash /setup/setup-keystore.sh
user: "0"
version: '3.5'
# will contain all elasticsearch data.
volumes:
elasticsearch-data:
secrets:
elasticsearch.keystore:
file: ./secrets/elasticsearch.keystore
ELK_VERSION=7.7.0
ELASTIC_USERNAME=elastic
ELASTIC_PASSWORD=changeme
COMPOSE_PROJECT_NAME=elastic
ELK_VERSION=7.7.0
#----------- Resources --------------------------#
ELASTICSEARCH_HEAP=1024m
LOGSTASH_HEAP=512m
#----------- Hosts and Ports --------------------#
# To be able to further "de-compose" the compose files, get hostnames from environment variables instead.
# Exit on Error
set -e
OUTPUT_DIR=/secrets
CA_FILE=$OUTPUT_DIR/elastic-stack-ca.p12
CERT_FILE=$OUTPUT_DIR/elastic-certificates.p12
printf "====== Generating Elasticsearch Certifications ======\n"
printf "=====================================================\n"
if [ -f "$CA_FILE" ]; then
# Exit on Error
set -e
OUTPUT_DIR=/secrets
CA_FILE=$OUTPUT_DIR/elastic-stack-ca.p12
CERT_FILE=$OUTPUT_DIR/elastic-certificates.p12
printf "====== Generating Elasticsearch Certifications ======\n"
printf "=====================================================\n"
if [ -f "$CA_FILE" ]; then