version: '3.8' services: elasticsearch: build: context: ./elasticsearch dockerfile: Dockerfile container_name: elasticsearch environment: - discovery.type=single-node - xpack.security.enabled=false ports: - "9200:9200" - "9300:9300" networks: - app-network healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:9200/_cluster/health" ] interval: 10s timeout: 5s retries: 5 start_period: 40s backend: container_name: backend_container build: context: ./Backend dockerfile: Dockerfile ports: - "5000:5000" environment: - ELASTICSEARCH_HOST=http://elasticsearch:9200 depends_on: elasticsearch: condition: service_healthy networks: - app-network frontend: container_name: frontend_container build: context: ./frontend dockerfile: Dockerfile ports: - "3000:3000" depends_on: - backend networks: - app-network networks: app-network: driver: bridge