hash-db icon indicating copy to clipboard operation
hash-db copied to clipboard

Docker setup?

Open farleyknight opened this issue 3 years ago • 4 comments

Was thinking that we could have a Docker image for hash-db, to eventually deploy to a cloud scenario.

farleyknight avatar May 13 '22 15:05 farleyknight

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"]

farleyknight avatar May 13 '22 15:05 farleyknight

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.

farleyknight avatar May 13 '22 15:05 farleyknight

@samsquire What do you think about adding a Dockerfile to the project?

farleyknight avatar May 15 '22 17:05 farleyknight

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.

samsquire avatar May 15 '22 18:05 samsquire