version: "3" services: haystack-api: build: context: . dockerfile: Dockerfile image: "deepset/haystack-cpu:latest" # Mount custom Pipeline YAML and custom Components. # volumes: # - ./rest_api/pipeline:/home/user/rest_api/pipeline ports: - 8000:8000 restart: on-failure environment: # See rest_api/pipelines.yaml for configurations of Search & Indexing Pipeline. - DOCUMENTSTORE_PARAMS_HOST=elasticsearch depends_on: - elasticsearch command: "/bin/bash -c 'sleep 10 && gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 1 --timeout 180'" elasticsearch: # This will start an empty elasticsearch instance (so you have to add your documents yourself) #image: "elasticsearch:7.9.2" # If you want a demo image instead that is "ready-to-query" with some indexed Game of Thrones articles: image: "deepset/elasticsearch-game-of-thrones" ports: - 9200:9200 restart: on-failure environment: - discovery.type=single-node ui: build: context: ui dockerfile: Dockerfile image: "deepset/haystack-streamlit-ui:latest" ports: - 8501:8501 restart: on-failure environment: - API_ENDPOINT=http://haystack-api:8000 - EVAL_FILE=eval_labels_example.csv command: "/bin/bash -c 'sleep 15 && streamlit run webapp.py'"