Skip to content

GhilaniYassine/Django-Docker-Deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 

Repository files navigation

Django Docker Deployment

This GitHub repository contains three complete guides on how to containerize a Django application using Docker. Each guide lives in its own branch, showing a different strategy for building and running Django inside containers.

🌟 Repository Structure

Branch Approach Description
Creating-Docker-image-from-Dockerfile Basic Docker Setup Build a Django image from a single Dockerfile β€” covers fundamentals and best practices
Docker-Compose Docker Compose Full multi-service setup (Django + Database + postgresql) with orchestration using Docker Compose
Multi-stage-Build-Docker Multi-stage Build Production-optimized image with separate build and runtime stages

πŸš€ Quick Start

  1. Clone the repository:

    git clone https://github.com/GhilaniYassine/Django-Docker-Deployment..git
    cd Django-Docker-Deployment.
  2. Choose your approach:

    # For Docker Compose approach
    git checkout Docker-Compose
    
    # For Multi-stage build 
    git checkout Multi-stage-Build-Docker
    
    # For advanced Dockerfile approach
    git checkout Creating-Docker-image-from-Dockerfile
  3. Follow the instructions in each branch's README for specific setup steps

πŸ“š What You'll Learn

  • Basic Containerization: Environment variables, port mapping, and Docker basics
  • Advanced Dockerfile Techniques: Layer optimization, multi-stage builds, and security best practices
  • Orchestration: Managing multiple services with Docker Compose
  • Production Deployment: Optimized builds for production environments

About

This project demonstrates how to containerize a Django application using Docker with proper environment variable management.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors