This project serves as a practical exercise to test your DevOps skills. It involves working with a sample e-commerce web application that allows users to browse and purchase kids' beds. Your task is to apply DevOps practices to containerize the application, set up CI/CD pipelines, and ensure proper validation and testing.
-
Fork the Repository
- Begin by forking this repository to your own GitHub account.
-
Create a Separate Branch
- Create a new branch named
devops-branchin your forked repository. This branch will be used for all your DevOps-related tasks.
- Create a new branch named
-
Containerize the Application
- Write a
Dockerfileto containerize the e-commerce web application. Ensure that the Dockerfile is properly configured to build an image for the application. Apply best practices in Dockerfile creation, such as:- Minimizing the number of layers
- Using a small base image
- Caching dependencies effectively
- Cleaning up unnecessary files to reduce the image size
- Write a
-
Deploy Using CI/CD Pipeline
- Use the
Dockerfileto deploy the application by setting up a CI/CD pipeline. This pipeline should be configured to run only for thedevops-branch, not for the master branch.
- Use the
-
Set Up Docker Compose
- Create a
docker-compose.ymlfile to deploy the application using Docker Compose. Although PostgreSQL is not used in this application, ensure that the Docker Compose setup is properly configured for the application container.
- Create a
-
Validation and Testing
- Add necessary validation and testing to confirm that the application runs correctly on a specific port. Ensure that all functionalities are working as expected and the deployment is stable.