Skip to content

Instantly share code, notes, and snippets.

@serverabuse
Last active April 8, 2020 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save serverabuse/20e5a4e68c834a89b6ea2b1c27eb91dc to your computer and use it in GitHub Desktop.
Save serverabuse/20e5a4e68c834a89b6ea2b1c27eb91dc to your computer and use it in GitHub Desktop.
Create ELK stack
#!/bin/bash
docker network create elastic
docker run -d --network elastic -p 9200:9200 -p 9300:9300 --name elasticsearch --restart=always -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.4.0
docker run -d --network elastic --name apm-server --restart=always -p 8200:8200 --user root -v /home/ec2-user/apm-server.docker.yml:/usr/share/apm-server/apm-server.yml:ro -e output.elasticsearch.hosts=["elasticsearch:9200"] docker.elastic.co/apm/apm-server:7.4.0
docker run -d -p 5601:5601 --name kibana --network elastic --restart=always -v /home/ec2-user/kibana.yml:/usr/share/kibana/config/kibana.yml kibana:7.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment