So I have a basic django blog application. Which i want to dockerise into django. And one more thing. I am writing my question here because there are live people to answer.
So I have a basic django blog application. Which i want to dockerise into django. And one more thing. I am writing my question here because there are live people to answer.
2
Answers
You should use a cookie cutter for dockerizing your Django application. Here you can read the docs https://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html
you need to pip freeze first so that you could know what your current Django application taking up. And use them as requirements.txt
Benefits of using Django on docker:
host.
eliminating errors that only happen in production.
You should start with reading Dokcer docs in order to understand what and why’s: https://docs.docker.com/
Long story short – containers (prular) enable to start every service (Django, database, possible front-end, servers, etc.) in separate container and furthermore, to start them up on any OS of your choice.
Those containers can communicate each other thru host separated docker network.
You will need Dockerfile – to set up service, and possibly Docker-compose (if multiple containers) to manage all the containers running.
Here’s example docker setup for Django: https://semaphoreci.com/community/tutorials/dockerizing-a-python-django-web-application