docker-compose.yml 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. version: "2.1"
  2. services:
  3. elasticsearch:
  4. image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
  5. container_name: elasticsearch
  6. environment:
  7. - cluster.name=docker-cluster
  8. - bootstrap.memory_lock=true
  9. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  10. ulimits:
  11. memlock:
  12. soft: -1
  13. hard: -1
  14. volumes:
  15. - esdata1:/usr/share/elasticsearch/data
  16. ports:
  17. - 9200:9200
  18. networks:
  19. - esnet
  20. elasticsearch2:
  21. image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
  22. container_name: elasticsearch2
  23. environment:
  24. - cluster.name=docker-cluster
  25. - bootstrap.memory_lock=true
  26. - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  27. - "discovery.zen.ping.unicast.hosts=elasticsearch"
  28. ulimits:
  29. memlock:
  30. soft: -1
  31. hard: -1
  32. volumes:
  33. - esdata2:/usr/share/elasticsearch/data
  34. networks:
  35. - esnet
  36. volumes:
  37. esdata1:
  38. driver: local
  39. esdata2:
  40. driver: local
  41. networks:
  42. esnet: