Open Kobzol opened 2 months ago
As mentioned on VSB Discord, I am taking this task. (just noticing -> no one works on this in paralell).
* [ ] Make it possible to start RQ workers inside Docker * [ ] Make it possible to run each worker in multiple instances * [ ] Workers use Docker internally, configure Docker-in-Docker. An example can be found [here](https://github.com/mrlvsb/kelvin/blob/1f96ae303fc3c61e76c56e1c076bac0c8940393c/docker-compose.yml), but it needs to be tested if it works, and how it interacts with Docker permissions.
I am thinking about the possible solutions:
A classic Docker-in-Docker (DinD) approach with a secure implementation.
Pros:
Cons:
Here, we run the Docker CLI inside the container, but the daemon remains on the host. We would be creating sibling containers, unlike the child containers in solution 1.
Pros:
Cons:
@Kobzol any opinion?
Sorry, I didn't have time to look into this yet. First we need to get the Docker change merged, then somehow deploy the Docker version on a new server and then we can start looking into DinD.
At a glance, I would probably choose DooD, to avoid complexity with managing the local images or rebuilding them all the time.
We would like to have the option to deploy Kelvin fully inside Docker, ideally with a single command, if possible. We want to have the following services running inside Docker, networked together:
This corresponds to the architecture described in docs.
Ideally, it should be possible to deploy everything with a single
docker-compose.yml
file. All configuration (directory/file paths, ports etc.) should ideally be configurable in the docker-compose file, through environment variables loaded from an.env
file. You can find an example of that in the existing docker-compose.yml file.Here is a broad TODO list of things (in almost arbitrary order) that we need to do in order to make this possible:
docker-compose.yml
frontend.js
,frontend.css
files and thedolos
directory in the final Docker imagelocal_settings.py
, which will be used to override configuration for the Django backend running inside of Dockerpython3 manage.py migrate
everytime the whole Docker deployment startsIf there is a better way to do this, other than docker-compose, we can also try it. But please no Kubernetes :)