Django & Docker - Open-source Projects

A curated list with Open-source projects crafted in Django and configured to work with Docker. All projects are published on Github (MIT License).

A curated list with Open-Source Django projects pre-configured to run in Docker.
Django & Docker - Open-source Projects

Hello! This article presents a curated list of Open-Source Django Projects already configured to run in Docker, the popular virtualization software.  For newcomers, Django is a leading web framework coded in Python by programming experts and open-source enthusiasts using a batteries-included concept. All projects mentioned on this page are available for download from Github (no registration lock) under MIT License.  Thanks for reading! - Topics covered:

  • Section #1: Django - Short Presentation
  • Section #2: What is Docker
  • Section #3: Install Docker (Unix workspace)
  • Section #4: Docker CheatSheet
  • Section #5: Pre-configured Docker Projects (all free)

1# - Django Presentation

Django is a modern web framework crafted in Python language that provides modules and libraries for many common features required in modern web development:

  • Basic authentication, Social Login
  • Out-of-the-box Admin Section with CRUD access for all tables
  • Abstract Database access via a powerful ORM
  • Powerful built-in security patterns
  • Helpers: forms, models, and data validation

Django can be installed in many ways and the most recommended way is to use PIP, the official Python package manager. Here is the complete list with commands:

Step #1 - Create a virtual environment

$ # Create the environment
$ virtualenv env 
$ # Activate the virtual environment
$ source env/bin/activate
Django - Create Virtual Environment 

Step #2 - Install Django via PIP

$ pip install Django // install latest version
// OR
$ pip install django==3.2.6 // install specific version
Django - Install via PIP

Step #3 - Build a basic Django project

$ mkdir firstproject 
$ cd firstproject
$ django-admin startproject config . 
Django - How to create a project

Step #4 - Start the project

$ python runserver 
Django - Start the project

If all goes well, we should see in the browser the default Django splash screen when accessing http://localhost:8000 .

The default page served by Django on first run.
Django - The Default Screen

2# - What is Docker

Probably a good definition of Docker is the one provided by the official help: Docker is virtualization software for developing, shipping, and running applications that provides a clear separation of applications from the infrastructure so we can deliver software much faster and reliable.

Docker - Official Logo.
Docker - Official Logo.

Basically, Docker provides a way to package applications into containers that are executable components built with applications source code and operating system libraries. Once the containers are built, Docker provides also a control layer that enables developers to build, deploy, start, stop, and update containers using simple commands. For more information about Docker feel free to access:

3# - Install Docker

All Django projects listed in the last section of this article can be compiled and executed without Docker by following the documentation provided for each project but using Docker the build and execution might be faster with fewer commands typed in the terminal.  Let's install Docker using an Ubuntu 18 LTS workstation.

Note: All commands presented in this section are executed using sudo , a command that requires ROOT privileges.  

Step #1 - Update the system to use the latest packages (optional but recommended)

$ sudo apt-get update
Install Docker - Update System Packages

Step #2 - Uninstall old versions of Docker (optional but recommended)

$ sudo apt-get remove docker-engine docker  
Docker Setup - Remove Legacy Versions

Step #3 - Re-Install Docker (the latest version shipped by Ubuntu)

$ sudo apt-get install
Docker - Install Ubuntu 18 LTS

Step #4 - Enable Docker as a service

$ sudo systemctl enable docker
$ sudo systemctl start docker
Docker - Service Installation

At this point, we should be able to build and start all Django samples using Docker. Just to check the installation we can check the version of the current Docker installation using --version argument:

$ docker --version 
Docker version 20.10.5, build 55c4c88 // <-- The Output 
Docker - Check Version

4# - Docker CheatSheet

This section is a short introduction to the most used Docker commands.

Inspecting Containers
$ docker --version       # check Docker version
$ docker ps -a           # list all containers
$ docker ps              # list all RUNNING containers
$ docker top <container> # list the active processes 
Docker Commands - Containers Information
Management Commands
$ docker run     <image>       # create and start the container
$ docker start   <container>   # start container
$ docker stop    <container>   # stop container (gracefully)
$ docker pause   <container>   # freeze the container
$ docker kill    <container>   # kill container (not gracefully)
$ docker restart <container>   # restart container (gracefully) 
Docker - Management Commands
Image Transfer Commands
$ docker pull  <image>   # pull an image from a registry
$ docker push  <image>   # push/save an image to a registry
$ docker search <image>  # returns all images related to search keyword
Docker - Image Transfer Commands
Miscellaneous Commands
$ docker container kill $(docker ps -q)  # kill all containers
$ docker container rm $(docker ps -a -q) # delete all containers 
$ docker network prune                   # delete all IPv4 used address 
Docker - Miscellaneous Commands

5# - Django & Docker Samples

With this minimal Django & Docker background we should be able to execute and understand how the samples are built and executed. Let's go!

Django Pixel Lite

Open-Source Django starter coded with basic modules, database, ORM, and deployment scripts on top of Pixel Lite UI Kit, a fully responsive and modern Bootstrap 5 UI Kit that will help you build creative and professional websites. The Django codebase is provided with database, ORM, authentication, and deployment scripts.

Django Pixel Lite - product page (contains sources and DEMO)
$ unzip
$ cd django-pixel-lite
$ docker-compose pull 
$ docker-compose build 
$ docker-compose up
Django Pixel Lite - Execute in Docker
Pixel Lite, open-source seed project crafted with Django and Docker.
Django Docker Sample - Pixel Lite.

Datta Able Django

Datta Able Bootstrap Lite is the most stylized Bootstrap 4 Lite Admin Template, around all other Lite/Free admin templates in the market. It comes with high feature-rich pages and components with fully developer-centric code. Before developing Datta Able our key points were performance and design.

Datta Able Django - product page (contains sources and DEMO)
$ unzip
$ cd django-datta-able
$ docker-compose pull 
$ docker-compose build 
$ docker-compose up
Django Datta Able - Execute in Docker
Datta Able, open-source seed project crafted with Django and Docker.
Django Docker Sample - Pixel Lite.

Django Bootstrap 5 Volt

Volt Dashboard is a free and open-source Bootstrap 5 Admin Dashboard featuring over 100 components, 11 example pages, and 3 plugins with Vanilla JS. There is more than 100 free Bootstrap 5 components included some of them being buttons, alerts, modals, and datepickers.

Django Bootstrap 5 Volt -  product page (contains sources and DEMO)
$ unzip
$ cd django-dashboard-volt
$ docker-compose pull 
$ docker-compose build 
$ docker-compose up
Django Volt - Execute in Docker
Volt Bootstrap 5, open-source seed project crafted with Django and Docker.
Django Docker Sample - Volt Dashboard.

Django AdminLTE

AdminLTE is one of the best open-source admin dashboard & control panel themes. Built on top of Bootstrap, AdminLTE provides a range of responsive, reusable, and commonly used components. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

AdminLTE Django -  product page (contains sources and DEMO)
$ unzip
$ cd django-adminlte
$ docker-compose pull 
$ docker-compose build 
$ docker-compose up
Django AdminLTE - Execute in Docker
AdminLTE, open-source seed project crafted with Django and Docker.
Django Docker Sample - AdminLTE Dashboard.

Django Atlantis Dark

Atlantis Lite (Dark Design) is a free bootstrap 4 admin dashboard that is beautifully and elegantly designed to display various metrics, numbers, or data visualization. Atlantis Lite admin dashboard has 2 layouts, many plugins, and UI components to help developers create dashboards quickly and effectively so they can save development time and also help users to make the right and fast decisions based on existing data.

Django Atlantis Dark -  product page (contains sources and DEMO)
Atlantis Dark, open-source seed project crafted with Django and Docker.
Django Docker Sample - Atlantis Dark.

Thanks for reading! For more resources please access: