!Docker-Django
Docker-Django is a boilerplate repository designed to kickstart your Django project with Dockerized services. It includes PostgreSQL and Redis support, making it easy to set up a development environment and deploy to production.
- Django project setup with Docker containers
- PostgreSQL database integration
- Redis caching support
- Whitenoise for serving static files
- Production hosting options included
-
Clone the Repository:
git clone https://github.com/MasterKale/Docker-Django.git
-
Remove the Existing Git History:
rm -rf Docker-Django/.git
-
Initialize a New Git Repository:
cd Docker-Django git init
-
Install Dependencies:
pipenv install --three
-
Create a New Django Project:
pipenv run django-admin startproject myproject .
-
Configure
settings.py
:- Set the
SECRET_KEY
(used in production). - Enable or disable
DEBUG
mode based on environment. - Configure
ALLOWED_HOSTS
andCSRF_TRUSTED_ORIGINS
. - Point Django to the Docker-hosted Postgres database.
- Set the
-
Run the Development Server:
docker-compose up
- Customize the boilerplate according to your project's requirements.
- Explore deployment options such as Kubernetes, AWS ECS, or Heroku.
- Scaling Python with Docker and Django: A step-by-step guide on deploying Django apps with Docker.
- Other Django-Docker examples:
- negeek/django-docker
- nickjj/docker-django-example
Feel free to adapt this boilerplate for your own projects! 🚀
If you have any specific questions or need further assistance, feel free to ask! 😊👍 .