# Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 version: '3.9' x-default-logging: &logging driver: "json-file" options: max-size: "5m" max-file: "2" volumes: opensearch-data: networks: default: name: opensearch-dashboards-demo driver: bridge services: # OpenSearch store - node (not for production - no security - only for test purpose ) opensearch: image: opensearchstaging/opensearch:${VERSION} container_name: opensearch environment: - cluster.name=opensearch-cluster - node.name=opensearch - discovery.seed_hosts=opensearch - cluster.initial_cluster_manager_nodes=opensearch - bootstrap.memory_lock=true - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" - "DISABLE_INSTALL_DEMO_CONFIG=true" - "DISABLE_SECURITY_PLUGIN=true" ulimits: memlock: soft: -1 hard: -1 nofile: soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536 hard: 65536 volumes: - opensearch-data:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container ports: - 9200:9200 - 9600:9600 expose: - "9200" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow"] interval: 20s timeout: 10s retries: 10 # OpenSearch store - dashboard opensearch-dashboards: container_name: opensearch-dashboards build: context: ./ dockerfile: Dockerfile args: - VERSION=${VERSION} ports: - 5601:5601 # Map host port 5601 to container port 5601 expose: - "5601" # Expose port 5601 for web access to OpenSearch Dashboards environment: OPENSEARCH_HOSTS: '["http://opensearch:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query depends_on: - opensearch