Services
Stateless Services
· ☕ 3 min read
1. Problem Description Background: a SaaS application developed with Django, offering document services externally. Its search feature is implemented through Django Haystack. Problem: the search feature is sometimes available and sometimes not. After repeated testing, the available and unavailable states were found to alternate, each occurring with a probability of

Building a Django Development Environment with Docker from Scratch (6) uWSGI, Django
· ☕ 4 min read
1. Directory Structure The django-devops-uwsgi directory holds the image build files that package uWSGI and Django. It installs the necessary packages such as uWSGI, pip, and virtualenv into the image. When a container is created from the image, the start.sh script runs: it creates the Python virtual runtime environment, installs the dependency packages from Django’s requirements.

Packaging a Django Development Environment with Docker from Scratch (5) Nginx
· ☕ 3 min read
1. Directory Structure 1 2 3 4 5 6 7 8 9 10 11 12 ├── django-devops-nginx │ ├── Dockerfile │ └── nginx.repo ├── django-devops-compose │ ├── docker-compose.yml │ ├── www │ ├── conf │ │ ├── nginx.conf │ ├── log │ │ ├── nginx │ │ │ ├── access.log │ │ │ ├── error.

Packaging a Django Development Environment with Docker from Scratch (3) Docker Compose
· ☕ 6 min read
1. Basic Concepts Docker Compose is a Docker tool for defining and running complex applications. With Docker Compose, you can define a multi-container application in a single file, then use a single command to start your application and finish all the preparation work. Docker Compose positions itself as ‘defining and running complex applications with Docker’.

Packaging a Django Development Environment with Docker from Scratch (2) Dockerfile
· ☕ 9 min read
1. Basic Concepts A Dockerfile is a collection of instructions for building a Docker image. Docker reads Dockerfile instructions to build an image automatically. A Dockerfile is similar to a Makefile: both are text files that organize all the instructions in the order the image is built. The command to build a Docker image: