docker-compose.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. version: '3'
  2. services:
  3. opensearch-node1:
  4. #image: opensearchproject/opensearch:2.0.1
  5. image: opensearchproject/opensearch:2.1.0
  6. container_name: opensearch-node1
  7. environment:
  8. - cluster.name=opensearch-cluster
  9. - node.name=opensearch-node1
  10. - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
  11. - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
  12. - "DISABLE_INSTALL_DEMO_CONFIG=false" # disables execution of install_demo_configuration.sh bundled with security plugin, which installs demo certificates and security configurations to OpenSearch
  13. - "DISABLE_SECURITY_PLUGIN=false" # disables security plugin entirely in OpenSearch by setting plugins.security.disabled: true in opensearch.yml
  14. - "discovery.type=single-node" # disables bootstrap checks that are enabled when network.host is set to a non-loopback address
  15. ulimits:
  16. memlock:
  17. soft: -1
  18. hard: -1
  19. nofile:
  20. soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
  21. hard: 65536
  22. volumes:
  23. - opensearch-data1:/usr/share/opensearch/data
  24. ports:
  25. - 9200:9200
  26. - 9600:9600 # required for Performance Analyzer
  27. networks:
  28. - opensearch-net
  29. opensearch-dashboards:
  30. volumes:
  31. - /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml #add config
  32. - /usr/share/opensearch-dashboards/config/client-cert.pem:/usr/share/opensearch-dashboards/config/client-cert.pem
  33. - /usr/share/opensearch-dashboards/config/client-cert-key.pem:/usr/share/opensearch-dashboards/config/client-cert-key.pem
  34. - /usr/share/opensearch-dashboards/config/root-ca.pem:/usr/share/opensearch-dashboards/config/root-ca.pem
  35. #image: opensearchproject/opensearch-dashboards:2.0.1
  36. image: opensearchproject/opensearch-dashboards:2.1.0
  37. container_name: opensearch-dashboards
  38. ports:
  39. - 5601:5601
  40. expose:
  41. - "5601"
  42. environment:
  43. #- 'OPENSEARCH_HOSTS=["https://opensearch-node1:9200"]'
  44. - "DISABLE_SECURITY_DASHBOARDS_PLUGIN=false" # disables security dashboards plugin in OpenSearch Dashboards
  45. networks:
  46. - opensearch-net
  47. volumes:
  48. opensearch-data1:
  49. networks:
  50. opensearch-net: