version: "3.8" services: relay: image: golang # build: # context: ../ # dockerfile: ./basic/Dockerfile environment: PORT: 2700 ES_URL: http://elasticsearch:9200 depends_on: elasticsearch: condition: service_healthy ports: - 2700:2700 volumes: - ./nostres:/bin/relay command: "/bin/relay" elasticsearch: container_name: elasticsearch image: docker.elastic.co/elasticsearch/elasticsearch:8.6.0 restart: always environment: - network.host=0.0.0.0 - discovery.type=single-node - cluster.name=docker-cluster - node.name=cluster1-node1 - xpack.license.self_generated.type=basic - xpack.security.enabled=false - "ES_JAVA_OPTS=-Xms${ES_MEM:-4g} -Xmx${ES_MEM:-4g}" ports: - '127.0.0.1:9200:9200' ulimits: memlock: soft: -1 hard: -1 healthcheck: test: ["CMD-SHELL", "curl --silent --fail elasticsearch:9200/_cluster/health || exit 1"] interval: 10s timeout: 5s retries: 5