This is a template for a Django project that uses Docker Compose, a Makefile for task automation, and PostgreSQL as the database.
Before using this project, make sure you have the following components installed:
- Docker
- Docker Compose
- GNU Make
- Clone this repository to your computer.
- Create a
.env
file based on.env.example
and specify the necessary environment variables.
- Open a terminal and navigate to the project's root directory.
- Use the command
make app
to build Docker containers and start the project. - Open your browser and go to
http://localhost:8000/
to view the project.
make app
: Start the project.make app-logs
: Follow the logs in app container.make app-down
: Stop application and all infrastructure.make storages
: Up only storages. you should run your application locally for debugging/developing purposesmake storages-logs
: Follow the logs in storages containersmake storages-down
: Stop all infrastructure
make migrate
: Apply Django migrations to the database.make migrations
: To create database migration files based on the changes you've made to your models.make superuser
: Create a Django superuser.make collectstatic
: To collect all necessary static files for your project.
- Make necessary changes to the Django source code as needed.
- Run
make migrate
andmake migrations
after making changes to Django models to update the database schema.
This project is distributed under the MIT License. See the LICENSE
file for additional information.