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:
The Django backend
nginx, which will serve the Django backend
Postgres (DB)
Redis (cache)
A set of Django RQ workers
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:
[ ] Add nginx to docker-compose.yml
[ ] Make it possible to map a host directory that contains nginx config
[ ] Make it possible to map a host directory that contains certificates
[ ] Make it possible to map a host directory containing persistent data for the Redis instance
[ ] Make sure that all the services in the docker compose file can talk to each other through the network
[ ] Build the JS frontend in the Kelvin Dockerfile, to make it available in the Docker image
[ ] Use a multi-stage build to only include the frontend.js, frontend.css files and the dolos directory in the final Docker image
[ ] Make it possible to map a host directory containing local_settings.py, which will be used to override configuration for the Django backend running inside of Docker
[ ] Setup nginx so that it serves the Kelvin Django backend
[ ] Configure a startup script that will run python3 manage.py migrate everytime the whole Docker deployment starts
[ ] 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, but it needs to be tested if it works, and how it interacts with Docker permissions.
If there is a better way to do this, other than docker-compose, we can also try it. But please no Kubernetes :)
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 :)