skip to Main Content

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


  1. 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:

    • Your code runs on any operating system that supports Docker.
    • You save time by not needing to configure system dependencies on your
      host.
    • Your local and production environments can be exactly the same,
      eliminating errors that only happen in production.
    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search