Last active
August 16, 2021 16:07
-
-
Save natesubra/7a2688e0157f5288221ba5777bbf7ea1 to your computer and use it in GitHub Desktop.
elk stack - docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First run: | |
# mkdir -p ./data/elasticsearch_data ./data/logstash_config && sudo chown -R 1000:1000 ./data | |
services: | |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.14.0 | |
container_name: elasticsearch | |
environment: | |
- "ES_JAVA_OPTS=-Xms1g -Xmx1g" | |
- "discovery.type=single-node" | |
- "xpack.license.self_generated.type=basic" | |
- "xpack.security.enabled=false" | |
- "xpack.monitoring.collection.enabled=true" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
- ./data/elasticsearch_data:/usr/share/elasticsearch/data | |
healthcheck: | |
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"] | |
interval: 30s | |
timeout: 30s | |
retries: 3 | |
# uncomment for logstash, you'll need a logstash.yml | |
# # https://www.elastic.co/guide/en/logstash/current/docker-config.html | |
# logstash: | |
# image: docker.elastic.co/logstash/logstash:7.14.0 | |
# environment: | |
# - "LS_JAVA_OPTS=-Xmx256m -Xms256m" | |
# volumes: | |
# - /etc/localtime:/etc/localtime:ro | |
# - /etc/timezone:/etc/timezone:ro | |
# - ./data/logstash_config:/usr/share/logstash/config # logstash settings go in here, need to be chowned to UID 1000 | |
# depends_on: | |
# - elasticsearch | |
# https://www.elastic.co/guide/en/kibana/current/docker.html | |
kibana: | |
image: docker.elastic.co/kibana/kibana:7.14.0 | |
environment: | |
- "xpack.license.self_generated.type=basic" | |
- "xpack.security.enabled=false" | |
- "xpack.monitoring.collection.enabled=true" | |
ports: | |
- 5601:5601 | |
volumes: | |
- /etc/localtime:/etc/localtime:ro | |
- /etc/timezone:/etc/timezone:ro | |
depends_on: | |
- elasticsearch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment