Project 3 – Containerize Apps
Architecture diagram

In this project, students will work in a team to deploy a web app as a Docker container. The web app container will be hosted on the AWS cloud and users will be able to access the web app via the public internet.
Requirements
Deploy and configure web app infrastructure with Terraform and/or Ansible
- Create a simple web app or leverage a web app that is already publicly available – for e.g. on GitHub.
- Dockerize the app.
- Create a Dockerfile with instructions to create a Docker image for this app.
- Create a DockerHub account – if you don’t have one already.
- Build the Docker image in both x86_64 and arm64 formats – e.g. use Docker Buildx tool – and push the Docker image to your DockerHub registry.
- Deploy the app container on AWS.
- Create and launch an EC2 instance that will serve as the container server to host your app container.
- In this EC2 server download and install Docker engine.
- Launch a container of your app in this server and ensure it is accessible via the public internet.
- Documentation
- Create a README.md in your GitHub repo.
- In the README.md
- URL to public GitHub repo.
- Architectural diagrams depicting the AWS cloud infrastructure setup, the web app architecture and any other pertinent visualizations.
- Include instructions on how users can access your web app and launch your app container services themselves.
- Bonus:
- Optimize your Docker image
- E.g. Try to minimize the size of the Docker image by
- Optimizing the cache steps.
- Using an alternative smaller base image – e.g. Alpine, slim versions of Ubuntu, etc.
- Using multi-build stages.
- E.g. Try to minimize the size of the Docker image by
- To add high availability and scalability to your web app you can deploy the app containers in EC2 instances that are part of an autoscaling group, and add an application load balancer in front. Your users will then hit your web app via the application load balancer address.
- You can use AWS ECS to host your containerized web app instead of a traditional EC2 server with Docker engine installed.
- Optimize your Docker image
Submission Instructions
- In the README.md of your GitHub repo include the names of members in your group.
- Download a Zip file of your completed GitHub repo.
- Click on
Hand Intab in the learning portal project page. - Click on
Upload Assignmentand upload the zip file. - After you have submitted your assignment, make your containerized web app service available on the public internet – e.g. turn on your AWS servers that are hosting the containerized web app – and notify Nhat with the address to your web app. Nhat will then test accessing your containerized web app.
