Deploy and Secure a React — Flask App With Docker and Nginx
Deployment and SSL encryption made easy
Published in
8 min readJun 2, 2020
Today we’ll use Docker and Docker-compose to deploy a secure web application on AWS.
We’ll cover:
- Building a simple React front-end using the Material-UI library and serving it with NGINX
- Designing a Flask API that receives data from the front-end
- Setting up a domain name and a free SSL certificate
We’ll make things very simple to understand how these components interact with each other. Here’s what the app looks like.
Let’s get started!
Launch a VM with a static public IP on AWS
For the purpose of this tutorial, I used a small t2-micro ec2 instance. It’s good enough and also eligible for the free-tier.
Once your VM is up and running, you’ll need to:
- assing a security group to allow inbound HTTP and HTTPS traffic