GithubHelp home page GithubHelp logo

justchillinghere / django-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bandirom/django-blog

0.0 0.0 0.0 620 KB

Django project base for blog (article, post) kind of sites

License: MIT License

Shell 0.29% JavaScript 2.51% Python 67.72% CSS 3.70% HTML 23.46% Dockerfile 2.32%

django-blog's Introduction

Django Blog project

Project features:

  • Docker/Docker-compose environment
  • Environment variables
  • Separated settings for Dev and Prod django version
  • Docker configuration for nginx for 80 and/or 443 ports (dev/stage/prod) (Let's Encrypt certbot)
  • Celery worker
  • Redis service for caching using socket. Also message broker for queue
  • RabbitMQ configuration
  • ASGI support
  • Linters integration (flake8, black, isort)
  • Swagger in Django Admin Panel
  • Ready for deploy by one click
  • Separated configuration for dev and prod (requirements and settings)
  • GitHub Actions
  • Redefined default User model (main.models.py)
  • MailHog, Jaeger, RabbitMQ integrations
  • Multi-stage build for prod versions
  • PostgreSql Backup

How to use:

Clone the repo or click "Use this template" button:

git clone https://github.com/bandirom/django-blog.git

Before running add your superuser email/password and project name in docker/prod/env/.data.env file

[email protected]
SUPERUSER_PASSWORD=secretp@ssword
MICROSERVICE_TITLE=MyProject

Run the local develop server:

docker-compose up -d --build
docker-compose logs -f
Server will bind 8000 port. You can get access to server by browser http://localhost:8000

Configuration for develop stage at 9000 port:

docker-compose -f prod.yml -f prod.dev.yml up -d --build
The same configuration could be for stage and prod:
docker-compose -f prod.yml -f prod.stage.yml up -d --build
docker-compose -f prod.yml -f prod.prod.yml up -d --build
For testing mail backend you can use MailHog service
docker-compose -f docker-compose -f docker/modules/mailhog.yml up -d --build

Don't forget to set SMTP mail backend in settings

For set https connection you should have a domain name

In prod.certbot.yml:

Change the envs: CERTBOT_EMAIL: your real email ENVSUBST_VARS: list of variables which set in nginx.conf files APP: value of the variable from list ENVSUBST_VARS

To set https for 2 and more nginx servers:

ENVSUBST_VARS: API UI
API: api.domain.com
UI: domain.com

Run command:

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.