AWS Builder Center

How I Deployed a Containerized Django & MySQL App on AWS EC2 with Nginx

A step-by-step guide to dockerizing a multi-container Django application, configuring an Nginx reverse proxy, and deploying it to an AWS EC2 instance.

Django Notes App

A Django-based Notes application containerized with Docker and deployed on AWS EC2.

🏗️ Architecture

Flow:
User → AWS EC2 → Nginx → Django → MySQL
Docker Compose is used to manage the application services.

🛠️ Tech Stack

  • Backend: Django, Python
  • Database: MySQL
  • Containerization: Docker, Docker Compose
  • Web Server: Nginx
  • Cloud: AWS EC2
  • OS: Ubuntu
  • Version Control: Git, GitHub

✨ Features

  • Create, view, update and delete notes
  • MySQL database integration
  • Dockerized Django application
  • Multi-container setup using Docker Compose
  • Nginx reverse proxy
  • AWS EC2 deployment

📸 Screenshots

Application

Docker Containers

Docker Compose

Dockerfile

MySQL Database

AWS EC2

Deployment Verification

☁️ Deployment

The application is deployed on an Ubuntu AWS EC2 instance using Docker Compose.
1
2
3
4
5
6
7
8
9
10
11
12
13
Local Development
↓
Docker
↓
Docker Compose
↓
AWS EC2
↓
Nginx
↓
Django
↓
MySQL
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article