Quickstart: Compose and Django
Quickstart: Docker Compose and Django
This quick-start guide demonstrates how to use Docker Compose to set up and run a simple Django/PostgreSQL app. Before starting, you’ll need to have Compose installed.
Define the project components
For this project, you need to create a Dockerfile, a Python dependencies file, and a docker-compose.yml
file.
-
Create an empty project directory.
You can name the directory something easy for you to remember. This directory is the context for your application image. The directory should only contain resources to build that image.
-
Create a new file called
Dockerfile
in your project directory.The Dockerfile defines an application’s image content via one or more build commands that configure that image. Once built, you c