Django_Docker_Project_Template

screenshot of Django_Docker_Project_Template

A template for a Django webserver within a Docker container, with several other components already set up.

Overview:

The Django Docker Project Template is a pre-configured template for setting up a Django webserver within a Docker container. It includes several helpful components such as a PostgreSQL database, Celery task manager, RabbitMQ message broker, and an nginx reverse proxy. This template provides an easy way to get started with Django development in a Docker environment.

Features:

  • Django webserver: A blank Django project is included, with modifications for easy implementation of Celery tasks.
  • PostgreSQL database: The database is already connected to Django and ready to be used.
  • Celery task manager: Enables the implementation of asynchronous and/or scheduled tasks.
  • RabbitMQ message broker: Allows the Celery worker process to receive messages from the Django webserver.
  • nginx reverse proxy: Serves the Django webserver and its static files to the outside network.

Configuration:

  1. Open the .env file and update the variables as necessary.

Running the Project:

Use the following commands to start the project:

  1. Build and run the project: docker-compose up -d --build
  2. Access the Django project shell: docker-compose exec web python Project/manage.py shell
  3. View the Django webserver's logs: docker-compose logs web

The project will be accessible at http://localhost:1337.

Summary:

The Django Docker Project Template provides a convenient starting point for setting up a Django webserver in a Docker container. With pre-configured components like PostgreSQL database, Celery task manager, RabbitMQ message broker, and nginx reverse proxy, it allows developers to quickly get started with Django development in a Docker environment. The template is easy to install and provides clear instructions for configuration and running the project. Overall, this template simplifies the setup process and provides a solid foundation for Django development.