Skip to content

Instantly share code, notes, and snippets.

@DRKV333
Last active August 9, 2024 12:26
Show Gist options
  • Save DRKV333/4cb7ccc93b1bbf6308fd6abf0cc351b3 to your computer and use it in GitHub Desktop.
Save DRKV333/4cb7ccc93b1bbf6308fd6abf0cc351b3 to your computer and use it in GitHub Desktop.
Simple docker-compose file to get elasticsearch and kibana running
services:
setup:
image: elasticsearch:8.14.3
profiles:
- setup
command: >
bash -c '
until curl -s -X POST -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" http://elasticsearch:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;
'
elasticsearch:
image: elasticsearch:8.14.3
environment:
discovery.type: single-node
xpack.security.http.ssl.enabled: false
ELASTIC_PASSWORD: $ELASTIC_PASSWORD
ports:
- 127.0.0.1:9200:9200
volumes:
- elastic_data:/usr/share/elasticsearch/data
kibana:
image: kibana:8.14.3
environment:
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ELASTICSEARCH_USERNAME: kibana_system
ELASTICSEARCH_PASSWORD: $KIBANA_PASSWORD
ports:
- 127.0.0.1:5601:5601
volumes:
elastic_data:
ELASTIC_PASSWORD=ChangeMe
KIBANA_PASSWORD=ChangeMeToo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment