Skip to content

Production-ready Django backend for a blog platform, using Docker, Gunicorn, and Nginx. Built with a clean architecture and multi-environment support.

Notifications You must be signed in to change notification settings

a-jalilian66/yadlog-blog

Repository files navigation

📰 Yadlog Blog Backend

A modern, scalable, multi-language-ready Django backend for a blog system with production-ready Docker setup.


📁 Project Structure

yadlog-backend/
├── Dockerfile
├── docker-compose.yml
├── docker-compose.staging.yml
├── docker-compose.prod.yml
├── requirements/
│   ├── base.txt
│   ├── development.txt
│   └── production.txt
├── scripts/
│   ├── entrypoint.sh
│   ├── entrypoint.prod.sh
│   └── entrypoint.staging.sh
├── src/
│   ├── manage.py
│   ├── yadlog/          # Django project
│   │   ├── settings/
│   │   └── locale/
│   └── apps/
│       └── posts/       # Blog app
└── staticfiles/

🚀 Development Setup

docker-compose down -v
docker-compose up --build

📦 Features

✅ Blog App (posts)

  • Models: Post, Category, Tag
  • Multi-language support via django-modeltranslation
  • Auto-generated translated slugs (with TranslatedSlugMixin)
  • Tag & Category system
  • MPTT support for nested categories

✅ Tech Stack

  • Python 3.11
  • Django 5+
  • PostgreSQL
  • Gunicorn + Nginx (in production)
  • Docker / Docker Compose
  • Static/media management with volumes

⚙️ Environments

  • docker-compose.yml → Development
  • docker-compose.staging.yml → Staging
  • docker-compose.prod.yml → Production

🛠 Recommended Dev Setup

  • Python interpreter from Docker
  • src/ marked as Sources Root (for clean imports like from apps.posts...)
  • PyCharm Docker integration enabled

✅ Deployment

docker-compose -f docker-compose.prod.yml up --build

Or staging:

docker-compose -f docker-compose.staging.yml up --build

Tailwind Build (Dev)

cd frontend npm install npm run watch

Tailwind Build (Production)

npm run build

About

Production-ready Django backend for a blog platform, using Docker, Gunicorn, and Nginx. Built with a clean architecture and multi-environment support.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published