forked from deepset-ai/haystack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.mitm.yml
34 lines (34 loc) · 1.49 KB
/
docker-compose.mitm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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"