{"id":30851587,"url":"https://github.com/vlymar1/django-docker-postgres-boilerplate","last_synced_at":"2026-04-29T23:03:32.572Z","repository":{"id":289622793,"uuid":"878580398","full_name":"vlymar1/django-docker-postgres-boilerplate","owner":"vlymar1","description":"This is a basic template for Django projects configured to use Docker Compose, Makefile, and PostgreSQL.","archived":false,"fork":false,"pushed_at":"2024-10-25T19:14:30.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T01:46:20.158Z","etag":null,"topics":["django","docker-compose","makefile","poetry","postgresql","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlymar1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-25T16:49:15.000Z","updated_at":"2024-10-25T19:14:34.000Z","dependencies_parsed_at":"2025-04-24T08:03:27.841Z","dependency_job_id":null,"html_url":"https://github.com/vlymar1/django-docker-postgres-boilerplate","commit_stats":null,"previous_names":["vlymar-dev/django-docker-postgres-boilerplate","vlymar1/django-docker-postgres-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vlymar1/django-docker-postgres-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fdjango-docker-postgres-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fdjango-docker-postgres-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fdjango-docker-postgres-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fdjango-docker-postgres-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlymar1","download_url":"https://codeload.github.com/vlymar1/django-docker-postgres-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fdjango-docker-postgres-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31953749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","docker-compose","makefile","poetry","postgresql","python3"],"created_at":"2025-09-07T07:18:05.537Z","updated_at":"2026-04-18T02:30:58.455Z","avatar_url":"https://github.com/vlymar1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Python](https://img.shields.io/badge/Python-3.12.2-3776AB?style=flat\u0026logo=Python\u0026logoColor=yellow)](https://www.python.org/)\n[![Django](https://img.shields.io/badge/Django-5.1.2-092E20?style=flat\u0026logo=django\u0026logoColor=white)](https://www.django-rest-framework.org/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL--336791?style=flat\u0026logo=PostgreSQL\u0026logoColor=white)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker--2496ED?style=flat\u0026logo=Docker\u0026logoColor=white)](https://www.docker.com/)\n[![Psycopg2](https://img.shields.io/badge/Psycopg2-2.9.10-4169E1?style=flat)](https://pypi.org/project/psycopg2-binary/)\n[![Poetry](https://img.shields.io/badge/Poetry--60A5FA?style=flat\u0026logo=poetry\u0026logoColor=white)](https://python-poetry.org/)\n\n# Django Boilerplate with Docker Compose, Makefile, and PostgreSQL\n\n## Table of Contents\n\n- [Project Description](#Project-Description)\n- [Requirements](#Requirements)\n- [Quick Start](#Quick-Start)\n- [Project Structure](#Project-Structure)\n- [Implemented Makefile Commands](#Implemented-Makefile-Commands)\n- [License](#license)\n\n## Project Description\n\nThis starter template is designed for Django projects and is configured to streamline development with Docker Compose, PostgreSQL, and a Makefile for common commands. \nIt provides a production-ready environment with minimal initial configuration, ideal for getting a Django project up and running quickly.\n\n### Features\n- ***Django:*** Pre-configured Django project structure with [local.py](#localpy) settings file for easy local setup.\n- ***Docker Compose:*** Manages containerized services for the Django application and PostgreSQL database.\n- ***PostgreSQL:*** Configured as the default database, ready to run in a Docker container.\n- ***Makefile:*** Provides easy-to-use commands for frequent tasks like building containers, starting the development server, running migrations, and managing static files.\n- ***Environment Variables:*** .env.example included to simplify configuration of database credentials and other sensitive settings.\n\n## Requirements\n*To use this boilerplate, ensure you have the following installed on your machine:*\n\n- ***Docker:*** Required for containerizing the Django application and PostgreSQL database.\n  - [Install Docker](https://docs.docker.com/get-docker/)\n- ***Docker Compose:*** Used to manage multiple Docker containers in a single setup.\n  - Docker Desktop includes Docker Compose. Alternatively, install it separately: [Docker Compose Installation](https://docs.docker.com/compose/install/)\n- ***Make:*** Allows simplified command execution using the Makefile.\n  - *Linux/macOS:* Make is usually pre-installed. If not, install it via your package manager:\n```sh\n   # Ubuntu/Debian\n   sudo apt install make\n\n   # macOS (with Homebrew)\n   brew install make\n```\n  - *Windows:* Use make with [Git Bash](https://gitforwindows.org/) or [WSL](https://docs.microsoft.com/en-us/windows/wsl/install) (Windows Subsystem for Linux).\n\n## Quick Start\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/dev-lymar/django-docker-postgres-boilerplate.git\n   cd django-docker-postgres-boilerplate\n   ```\n\n2. Setup environment variables from .env.example:\n```sh\n    cp .env.example .env\n```\n\n3. Run project \n```sh\n   make app\n```\n\n### local.py\n\nFor ease of development, you can create a `local.py` file within `core/project/settings` to customize local configurations:\n   ```sh\n   from .main import *\n   \n   \n   DEBUG = True\n   ```\nThis allows for local overrides without risking accidental changes in the production environment.\n\n## Project Structure\n\n*The project structure is organized to keep core components isolated and manageable:*\n\n```sh\n.\n├── Dockerfile\n├── LICENSE\n├── Makefile\n├── README.md\n├── core\n│   ├── apps\n│   │   └── products\n│   │       ├── admin.py\n│   │       ├── apps.py\n│   │       ├── migrations\n│   │       └── models.py\n│   └── project\n│       ├── settings\n│       │   ├── local.py\n│       │   └── main.py\n│       ├── urls.py\n│       └── wsgi.py\n├── docker_compose\n│   ├── app.yaml\n│   └── storages.yaml\n├── entrypoint.sh\n├── .env\n├── manage.py\n├── poetry.lock\n└── pyproject.toml\n```\n\n- **core/apps/products** - Example application with basic structure files (`admin.py`, `apps.py`, etc.).\n- **core/project/settings** - Main settings folder with `main.py` (production settings) and `local.py` (for development overrides).\n- **docker_compose** - Contains `app.yaml` and `storages.yaml` for Docker Compose configurations.\n\n### Adding a New Django Application\n#### To add a new Django application within the `core/apps` directory:\n\n- Run the following command, replacing `newapp` with your app's name:\n```sh\n  django-admin startapp newapp core/apps/newapp\n```\n- Register the new application in `INSTALLED_APPS` in the `core/project/settings/main.py` file:\n```sh\n    INSTALLED_APPS = [\n    # Other installed apps...\n    'core.apps.newapp',\n]\n```\n\n## Implemented Makefile Commands\n\n* `make app` - Starts the application and database/infrastructure.\n* `make app-logs` - Follow the logs in app container.\n* `make app-down` - Down application and all infrastructure.\n* `make storages` - Up only infrastructure. You should run your application locally for debugging/developing purposes.\n* `make storages-logs` - Follow the logs in storages containers.\n* `make storages-down` - Down all infrastructure.\n* `make postgres` - Enter postgres container.\n\n### Most Used Django Specific Commands\n\n* `make migrations` - Make migrations to models\n* `make migrate` - Apply all made migrations\n* `make collectstatic` - Collect static\n* `make superuser` - Create admin user\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlymar1%2Fdjango-docker-postgres-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlymar1%2Fdjango-docker-postgres-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlymar1%2Fdjango-docker-postgres-boilerplate/lists"}