DEV Community

Victor M.
Victor M.

Posted on

Template Django+Docker

Hello, community! 📦

Today I want to share a project that I just published on GitHub. It has completely streamlined how I structure my development setups. It is an automated template to deploy Django development environments using Docker, designed under the core principle of absolute portability.

As developers, we often switch between different workstations (e.g., moving from a desktop tower to a laptop). I wanted to eliminate the friction and repetitive nature of configuring local virtual environments (venv), installing specific Python versions, or dealing with dependency version conflicts on every single machine.

Here is how the project works and how I tackled the configuration dynamically.


🛠️ The Tech Stack

The template comes pre-configured with a lightweight base, ready for traditional web development or API creation:

  • Python 3.11-slim
  • Django 5.0.6
  • Django REST Framework 3.15.1
  • Docker & Docker Compose
  • Windows Batch Scripting (for local automation)

🚀 The Workflow: True Portability

The project is built to act as a "master mold." To prevent container naming conflicts in Docker, the usage workflow is as follows:

  1. Create a brand-new folder on your computer with your app's name (e.g., mi_app_biblioteca).
  2. Copy the original configuration files from the template into that folder (Dockerfile, docker-compose.yml, requirements.txt, and start_project.bat).
  3. Double-click start_project.bat.

https://github.com/victor-manzaneque/template-django-docker

Top comments (0)