hash-db
hash-db copied to clipboard
Docker setup?
Was thinking that we could have a Docker image for hash-db, to eventually deploy to a cloud scenario.
Here's a very simple Dockerfile I made when I first forked hash-db
# syntax=docker/dockerfile:1
FROM python:3.8-slim-buster
EXPOSE 8000
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
CMD ["gunicorn", "-w", "1", "-k", "gevent", "-b", "0.0.0.0:8000", "server:app"]
The main problem with this is that it does not also bring up the client.py instances. I think I may end up using your start-all.sh. But I would like to make the ports and number of client.py instances configurable.
@samsquire What do you think about adding a Dockerfile to the project?
I think it's a really good idea. It's an experimental project and not for serious use but I see it at as a learning implementation. I am happy to merge a PR unless I get around to it. I've been spending more time thinking of features I want to add. I want to add document storage. I kind of develop on this project with vim and a tab for start-all.sh. I never put any assertions on the example.py. I just check it manually so I ought to add tests so I know if I break something.