mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-28 15:38:36 +00:00
* add docker-compose override file for traffic monitoring * Update Documentation & Code Style * remove faulty imports Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
35 lines
1.5 KiB
YAML
35 lines
1.5 KiB
YAML
# docker-compose override file to enable HTTP traffic monitoring between ui, haystack-api and elasticsearch using mitmproxy.
|
|
# After startup you can find mitmweb under localhost:8081 in your browser.
|
|
# Usage: docker-compose -f docker-compose[-gpu].yml -f docker-compose.mitm.yml up
|
|
version: "3"
|
|
services:
|
|
haystack-api:
|
|
environment:
|
|
- HTTP_PROXY=http://mitmproxy:8080
|
|
- HTTPS_PROXY=https://mitmproxy:8080
|
|
- REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
|
|
- DOCUMENTSTORE_PARAMS_USE_SYSTEM_PROXY=true
|
|
command: "/bin/bash -c 'sleep 10
|
|
&& wget -e http_proxy=mitmproxy:8080 -O /usr/local/share/ca-certificates/mitmproxy.crt http://mitm.it/cert/pem
|
|
&& update-ca-certificates
|
|
&& gunicorn rest_api.application:app -b 0.0.0.0 -k uvicorn.workers.UvicornWorker --workers 2 --timeout 180'"
|
|
depends_on:
|
|
- mitmproxy
|
|
ui:
|
|
environment:
|
|
- HTTP_PROXY=http://mitmproxy:8080
|
|
- HTTPS_PROXY=https://mitmproxy:8080
|
|
- REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
|
|
command: "/bin/bash -c 'sleep 15
|
|
&& wget -e http_proxy=mitmproxy:8080 -O /usr/local/share/ca-certificates/mitmproxy.crt http://mitm.it/cert/pem
|
|
&& update-ca-certificates
|
|
&& python -m streamlit run ui/webapp.py'"
|
|
depends_on:
|
|
- mitmproxy
|
|
mitmproxy:
|
|
image: "mitmproxy/mitmproxy:latest"
|
|
ports:
|
|
- 8080:8080
|
|
- 8081:8081
|
|
command: "mitmweb --web-host 0.0.0.0 --set block_global=false"
|