services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0 container_name: es-test ports: - 9200:9200 - 9300:9300 environment: - xpack.security.enabled=false - discovery.type=single-node healthcheck: test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"] interval: 30s timeout: 30s retries: 3