-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docker-compose override file for Traffic Monitoring (#2224)
* 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>
- Loading branch information
1 parent
9096dda
commit b2e6dcc
Showing
2 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters