Skip to content
/ dj-ms-core Public template

Sample Django project ready for microservices architecture. Supports both Docker Compose and Kubernetes deployment. Includes some improvements, such as expiring token authentication.

License

Notifications You must be signed in to change notification settings

dj-ms/dj-ms-core

Repository files navigation

Django microservice core

GitHub release (latest by date) GitHub commit activity GitHub issues GitHub closed issues GitHub repo size Docker Image Size (latest by date)


Purpose

This project helps to develop microservices with Django Framework.

No more tens of apps in one project. Separate your apps into microservices and connect them under one domain. Every Django app can be developed and deployed separately, even by different teams. But all of them will be under one domain and will have unified authentication.


Note: First of all this is simple Django project with some customizations. If you are newbie in Django, you can use this project as a template for your own projects. I'm not very cool in programming, but I have some experience in Python and Django and want to share it with you.


Not ready for production. Will be ready with version 1.0.0


How it works

How it works


What's inside

  • Unified authentication in all microservices
  • Production deployment with Docker Compose or Kubernetes
  • Celery, Celery Beat, RabbitMQ, Postgres and Nginx included in Docker Compose
  • Expiring Bearer Token authentication
  • Custom user model
  • Custom db router for auth models
  • Object changes logging to one DB with django-auditlog
  • Static and media files served by Nginx
  • Message brokers integration (there is RabbitMQ in docker compose, but at this time it's only used by Celery)
  • Automated CI/CD either with GitHub Actions, GitLab CI or Bitbucket Pipelines
  • Active directory authentication
  • Automatic discovery of microservices

Requirements

Of course, you can just run project without docker right on your machine. But docker is recommended way.

You will need Python only if you want to run this project locally without docker.


Installation


Examples

You can find example microservice apps under forks section.

Also, there is special example repos:


Contributing

I will be very happy if you will contribute to this project. You can help with code, documentation, ideas, etc. Just create an issue or pull request. I will be glad to discuss it with you. Also, you can contact me via email: [email protected].

About

Sample Django project ready for microservices architecture. Supports both Docker Compose and Kubernetes deployment. Includes some improvements, such as expiring token authentication.

Topics

Resources

License

Stars

Watchers

Forks