Architecture
CI/CD Pipeline
- The deployment pipeline is triggered by a push to the
main
orstaging
branch. - To avoid additional costs on AWS, we build the frontend and backend images on the GitHub Actions runner and push them to the Docker Hub.
- Our AWS EC2 instances pull the images and restart the containers.
Production Architecture
- This architecture diagram represents a high-level overview, some details such as certificate management are not shown.
- To reduce bandwidth costs when serving media files,
/media
serves as a proxy to the S3 bucket, using presigned URLS, and cached using NGINX.
Development Architecture
- The development environment can be brought up with
./run.sh
, it also has additional containers for testing which can be brought up with./test.sh
. - We make use of a self-signed certificate for local development, which is stored in the
nginx
container and used by thefrontend
container. - Our backend container waits for the
mysql
container to be ready before starting the Django application. - Our backend container is setup to use the
devuser
anddevpassword
credentials in.env
by default.