Skip to content

Commit

Permalink
Merge pull request #1099 from soulteary/feat/one-step-web-log-viewer
Browse files Browse the repository at this point in the history
feat: one-step docker online log viewer
  • Loading branch information
shiyu22 committed Sep 21, 2022
2 parents 41550ad + 0713519 commit 93d3b8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion solutions/reverse_image_search/one_step/README.md
Expand Up @@ -4,9 +4,12 @@
## Play with Docker

```bash
docker run --rm -it -v `pwd`/images:/images -p 8000:80 milvusbootcamp/one-step-img-search:2.1.0
+docker run --rm -it -v `pwd`/images:/images -p 8000:80 -p 8080:8080 milvusbootcamp/one-step-img-search:2.1.0
```

- 8000: App
- 8000: Log Viewer

## How to build docker images

```bash
Expand Down
9 changes: 9 additions & 0 deletions solutions/reverse_image_search/one_step/docker/Dockerfile
Expand Up @@ -22,6 +22,9 @@ RUN echo $' \n\
file=/var/run/supervisor.sock \n\
chmod=0700 \n\
[inet_http_server] \n\
port=0.0.0.0:8080 \n\
[supervisord] \n\
nodaemon=true \n\
logfile=/var/log/supervisor/supervisord.log \n\
Expand All @@ -46,4 +49,10 @@ command=/app/client/web \n\
'> /etc/supervisor/supervisord.conf

COPY client/src/containers/Logo.svg /usr/lib/python2.7/dist-packages/supervisor/ui/images/logo.svg
RUN sed -i -E "s/\"images\/supervisor.gif\"/\"images\/logo.svg\"/g" /usr/lib/python2.7/dist-packages/supervisor/ui/status.html
RUN sed -i -E "s/alt=\"Supervisor status\"/style=\"width: 120px;\"/g" /usr/lib/python2.7/dist-packages/supervisor/ui/status.html
RUN sed -i -E "s/<body>/<body style=\"background: #212121;\">/g" /usr/lib/python2.7/dist-packages/supervisor/ui/status.html
RUN sed -i -E "s/tailbody.content(tail)/tail.decode(encoding=\"utf8\",errors=\"ignore\")/g" /usr/lib/python2.7/dist-packages/supervisor/web.py

CMD ["/usr/bin/supervisord","-c","/etc/supervisor/supervisord.conf"]

0 comments on commit 93d3b8a

Please sign in to comment.