A containerized static web application deployed on AWS EC2 using Docker and NGINX, showcasing a DevOps workflow including Docker image build, Docker Hub registry, and cloud deployment.
This project demonstrates how to containerize and deploy a static web application using Docker on AWS cloud infrastructure.
The objective is to showcase a simple DevOps deployment workflow where:
- A web application is created using HTML, CSS, and JavaScript
- The application is containerized using Docker
- The container image is stored in Docker Hub
- The container is deployed on an AWS EC2 server
- The application is served using NGINX
- End users can access the website through the public internet
This project demonstrates key concepts used in modern DevOps and Cloud Engineering workflows.
| Technology | Purpose |
|---|---|
| π³ Docker | Containerization platform |
| π NGINX | Web server to serve static files |
| β AWS EC2 | Cloud virtual machine |
| π¦ Docker Hub | Container image registry |
| π GitHub | Source code management |
| π» HTML / CSS / JS | Frontend web application |
docker-nginx-webapp/
β
βββ architecture
β βββ architecture-diagram.png
β
βββ screenshots/
β βββ website-live.png
β βββ complete-webpage.png
β βββ docker-build.png
β βββ docker-images.png
β βββ docker-container-running.png
β βββ ec2-instance-running.png
β βββ security-group-rules.png
β βββ ssh-login.png
β βββ dockerhub-image.png
β
βββ css
β βββ styles.css
βββ js
β βββ script.js
βββ Dockerfile
βββ index.html
βββ README.md
The project follows a containerized cloud deployment architecture.
-
Developer writes application code on local machine
-
Code is pushed to GitHub repository
-
Docker builds the container image using a Dockerfile
-
Image is pushed to Docker Hub registry
-
AWS EC2 instance is launched
-
Docker engine is installed on the EC2 server
-
EC2 pulls the Docker image from Docker Hub
-
Docker container starts running on EC2
-
NGINX serves the static web application
-
End users access the website through the EC2 Public IP
The developer writes and manages the web application source code locally.
GitHub is used for version control and source code management.
The Dockerfile defines how the application is packaged into a container image.
Docker Hub stores the container image and allows it to be pulled by servers.
An EC2 virtual machine hosts the Docker engine and runs the application container.
Docker Engine manages container lifecycle on the server.
NGINX serves the static website files inside the Docker container.
Users access the deployed website through the EC2 public IP address.
This project follows several basic cloud security practices:
- SSH key-based authentication
- Restricted inbound rules in AWS Security Groups
- Only required ports opened (22 and 80)
- Containerized environment for application isolation
- Minimal NGINX base image used
These practices reduce the attack surface of the deployed infrastructure.
This project was deployed using the AWS Free Tier.
Cost optimization steps:
- Used t3.micro EC2 instance
- Stopped EC2 instance when not in use
- Used Docker Hub free registry
- Avoided additional AWS paid services
Estimated cost: $0 within Free Tier limits
This project can be extended with more advanced DevOps practices:
- Implement CI/CD using GitHub Actions
- Automate deployments using AWS CodePipeline
- Add custom domain with Route53
- Enable HTTPS using AWS Certificate Manager
- Deploy infrastructure using Terraform
- Implement Docker Compose
- Add Monitoring and Logging
These improvements would transform the project into a production-level DevOps pipeline.
Through this project, the following concepts were learned:
- Docker containerization
- Writing Dockerfiles
- Managing container images
- Using Docker Hub registry
- Deploying applications on AWS EC2
- Configuring security groups
- Running containers on cloud servers
- Hosting web applications using NGINX
This project provided hands-on experience with real-world DevOps workflows.
This project demonstrates how a simple web application can be containerized and deployed on cloud infrastructure using Docker and AWS.
By combining containerization with cloud services, application deployment becomes:
- Portable
- Scalable
- Consistent
These are essential principles in modern DevOps and cloud-native development.









