Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cat docker-compose.yml
- version: '3'
- services:
- elasticsearch:
- image: elasticsearch:6.5.4
- ports:
- - 9200:9200
- - 9300:9300
- #Aumentando limite de memória para container
- $sudo sysctl -w vm.max_map_count=262144
- #Subindo ambiente docker-compose em background
- $sudo docker-compose up -d
- #Checando saúde do ElasticSearch
- $curl -X GET "localhost:9200/_cluster/health"
- #Inserindo registro onde o index é twitter, type é _doc e _id é 1
- $curl -X PUT "localhost:9200/twitter/_doc/1" -H 'Content-Type: application/json' -d'
- {
- "user" : "kimchy",
- "post_date" : "2009-11-15T14:12:12",
- "message" : "trying out Elasticsearch"
- }
- '
- #Buscando registro onde o index é twitter, type é _doc e _id é 1
- $curl -X GET "localhost:9200/twitter/_doc/1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement