diff --git a/elasticsearch/.env b/elasticsearch/.env new file mode 100644 index 0000000..b9d3980 --- /dev/null +++ b/elasticsearch/.env @@ -0,0 +1,4 @@ +# Version of Elastic products +STACK_VERSION=8.4.0 # Port to expose Elasticsearch HTTP API to the host +ES_PORT=9200 # Port to expose Kibana to the host +KIBANA_PORT=5601 diff --git a/elasticsearch/docker-compose.yaml b/elasticsearch/docker-compose.yaml new file mode 100644 index 0000000..0fe8582 --- /dev/null +++ b/elasticsearch/docker-compose.yaml @@ -0,0 +1,33 @@ +version: '3.8' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION} + container_name: elasticsearch + volumes: + - elasticsearch-data:/usr/share/elasticsearch/data + ports: + - ${ES_PORT}:9200 + restart: always + environment: + - xpack.security.enabled=false + - discovery.type=single-node + ulimits: + memlock: + soft: -1 + hard: -1 + kibana: + depends_on: + - elasticsearch + image: docker.elastic.co/kibana/kibana:${STACK_VERSION} + container_name: kibana + volumes: + - kibana-data:/usr/share/kibana/data + ports: + - ${KIBANA_PORT}:5601 + restart: always + environment: + - ELASTICSEARCH_HOSTS=http://elasticsearch:9200volumes: + elasticsearch-data: + driver: local + kibana-data: + driver: local