
Build a Django REST API using Docker and tools like Celery, Redis, Flower, Nginx, Portainer, and shell scripts. Deploy securely with HTTPS and Let's Encrypt, and test with pytest.
Prepare for Django REST framework with Docker by mastering APIs, containers, and token authentication. Understand HTTP vs HTTPS, UUIDs, testing basics, and logging with nginx on Linux or macOS.
Explore the tools from development to production, including Docker, Nginx, Mail Hog, Mailgun, Celery with Redis, and Elasticsearch, to build a Django REST backend clone of Medium.
Create a working directory and a src folder, launch the project in VS Code, set up and activate a Python virtual environment, add python gitignore, and initialize a git repository.
Define a multi-environment requirements workflow by creating base.txt, local.txt, and production.txt files, install packages with pip, upgrade pip, and initialize a Django project with django-admin.
Organize Django settings with a layered base local production approach, separating apps, middleware, and databases while managing env vars, secrets, cors, and admin URLs.
Organize django apps within a project by creating co_apps, configuring app configs with get_text_lazy for translation, and setting verbose names, then run the server to view the landing page.
Discover how to implement Django logging with the Python logging module, using loggers, levels, handlers, filters, and formatters to debug, develop, and operate production apps.
Configure a Django logger in settings.py with a verbose formatter, console handler, and root logger at debug and info, then test using a non-existent page.
Learn how to set up Insomnia for API requests, create a test environment with local and docker URLs, and use environment variables and bearer authentication for endpoints.
Configure Docker engine and compose with Docker Desktop, then build a two-stage Dockerfile that installs dependencies from local wheels and runs a Django app with entrypoint and start scripts.
Define Postgres environment variables in the ends folder and implement an entrypoint script that waits for Postgres, then starts the API via Docker compose.
Create a start script to migrate models, collect static files, and run the Django server on port 8000, with an entrypoint and dockerignore in the project root.
Configure docker compose to run a Django rest framework api with Postgres and MailHog, using a local yaml and a Dockerfile.
Run docker-compose config to verify API and Postgres environment variables, then build and run containers with an arm workaround for linux amd64, and verify migrations, admin, mailhog, logs, and volumes.
Learn to build postgres backup and restore toolkit using shell scripts in a docker setup, defining constants dot H for backup paths and messages dot sh with ansi escape codes.
Create a yes_no shell script that prompts for confirmation and exits 0 or 1, and a countdown script that shows a real-time terminal timer for backup and restoration workflows.
Create and manage Postgres backups with bash scripts in a Django restful APIs course project, detailing directory structure, environment variables, pg_dump, gzip compression, and a backups viewer.
Learn to build a database restore script for PostgreSQL within a dockerized Django RESTful API project, including parameter validation, backup file checks, and restoring from a gzip-compressed SQL backup.
Learn to use makefiles to shorten docker commands for managing Django RESTful APIs with Docker, including building, running, logs, migrations, collect static, and super user setup.
Define a custom user manager in django to use email as the unique login identifier, validate emails, and override create_user and create_superuser for an abstract base user model.
Learn to implement a Django custom user model with a pseudo primary key, using a big auto field for primary key and a UUID for the identifier, enabling email authentication.
Create a custom Django admin user form by subclassing user creation and change forms, defining meta fields, and overriding clean_email to enforce unique emails with an error message.
Customize the Django admin for a user model by subclassing UserAdmin, configuring forms and fieldsets. Learn to expose DRF Yazji open api docs in Docker with migrations.
Learn how Nginx serves as a reverse proxy and load balancer in a Django REST setup, enabling path-based routing to Django API and a React frontend.
Set up nginx in docker, configure an upstream api on port 8000, and implement reverse proxy rules for api v1, admin, doc, static, and media paths using a custom default.conf.
Configure an nginx service in docker-compose, expose the API port internally, add static and media volumes, and map host port 8080 to container 80 for a Django REST API.
Compare synchronous and asynchronous programming in Django, showing blocking behavior and how Celery enables tasks to run in the background, with Redis as broker and backend, plus Flower for monitoring.
Configure Celery with Redis, Flower, and Django Celery Email in a Django RESTful API project, update requirements files, create salary.py, and enable auto-discovery of tasks during Django startup.
Configure a docker compose setup for django celery by adding redis, celery worker, and flower services to the local yaml, wiring networks, volumes, and ports.
configure celery radius and flower for a django rest api with docker by creating start scripts for celery worker and flower, updating the dockerfile, and rebuilding containers.
Hi, welcome to this course on building a production ready, detailed Django REST API, running on a web server powered by NGINX, on a custom domain name and served securely over HTTPS with SSL Certificates from Letsencrypt.
This course is NOT for absolute beginners.
We shall achieve our goal by leveraging tools such as Docker, Celery, Redis, Flower, Nginx, Nginx Proxy manager, Portainer, shell scripts and more.
This course is targeted at those with AT LEAST 6 months of web development experience, but more is better. Before beginning, you should have some familiarity with the following concepts, in as much as I will try to explain everything.
The concepts we shall cover include:
Docker and running multiple containers
2 Securing a Django REST API with HTTPS using SSL Certificates
REST APIs with Django and Django Rest Framework
Class Based Views.
Shell Scripting.
Asynchronous tasks with Celery and Redis
Asynchronous tasks monitoring with Flower
Introduction to API testing with Pytest using factories and fixtures.
Token based authentication
Working with email in development with Mailhog and in production with Mailgun
Python Test coverage
Serving static and media files with NGINX and whitenoise
Makefiles and how they make working with Docker easier.
All this shall be covered step by step, so that you can leverage the skills you learn in this course to build even bigger and better applications at scale.
My Hope is that you shall gain immense value from this.