Skip to content

prashantgohel321/FlaskApp-DockerFilePractice2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Deploy Flask App on AWS EC2 using Docker

A complete step-by-step tutorial on how to deploy a Python Flask App on an AWS EC2 instance using Docker, aimed at beginners in DevOps and Cloud Computing.

πŸŽ₯ Watch the Full Video Tutorial Here:
Watch on YouTube


πŸ“Œ What You'll Learn

  • Launch and configure an AWS EC2 instance
  • Connect to EC2 using SSH in WSL (Ubuntu on Windows)
  • Install Docker on EC2 instance
  • Clone a simple Flask app with app.py, run.py, and req.txt
  • Write a custom Dockerfile
  • Build and run a Docker image
  • Expose the Flask app on the browser using public IP

πŸ› οΈ Technologies Used

  • AWS EC2 (Ubuntu)
  • Docker & Dockerfile
  • Python 3.7
  • Flask
  • Git
  • WSL (Ubuntu on Windows)

🧾 Dockerfile Used

FROM python:3.7
WORKDIR /app
COPY . .
RUN pip install -r req.txt
ENTRYPOINT ["python"]
CMD ["run.py"]

πŸ§ͺ Key Commands

sudo apt update
sudo apt install docker.io
git clone <your-flask-repo-url>
docker build -t flask-app .
docker run -d -p 80:80 flask-app

🌐 Demo

Once deployed, access your app using:

http://<your-ec2-public-ip>

πŸ”— Useful Links

About

Deploy a Flask app on AWS EC2 using Docker | Beginner-friendly DevOps project with full video walkthrough.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages