Docker
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 (4) Project Organization
· β˜• 3 min read
1. Deployment Architecture The program processing flow when a browser visits a page: (1) The browser sends a request to Nginx. If it matches a static URL on the Nginx side, for example files such as js, css, or 404.html under the /static directory, Nginx returns the file directly. Other request URLs are forwarded to uWSGI for processing via the uwsgi_pass configuration.

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: