CI/CD, Docker/Dockerhub, Github Action, Terraform
1️⃣ What is GitHub Actions?
Answer:
GitHub Actions is a tool that runs automatic tasks when something happens in a GitHub repository, like when code is pushed.
In my project, GitHub Actions automatically builds a Docker image and pushes it to Docker Hub.
👉 In simple words:
GitHub Actions automates tasks like building, testing, and deploying code.
2️⃣ What is CI/CD?
Answer:
CI/CD stands for Continuous Integration and Continuous Deployment.
CI means automatically building and testing code when we push changes.
CD means automatically deploying the application to a server.
👉 In simple words:
CI/CD automates the process of building and deploying applications.
3️⃣ What is Docker and why did you use it?
Answer:
Docker packages an application and all its dependencies into a container so it runs the same everywhere.
I used Docker to make sure my Strapi app runs the same on my laptop and on AWS EC2.
👉 In simple words:
Docker makes the app portable and easy to run anywhere.
4️⃣ What is Docker Hub?
Answer:
Docker Hub is an online registry where Docker images are stored.
My CI pipeline pushes the built Docker image to Docker Hub, and my EC2 server pulls the image from there to run the app.
👉 In simple words:
Docker Hub stores my app image so servers can download and run it.
5️⃣ What is Terraform?
Answer:
Terraform is a tool used to create and manage cloud resources using code.
I used Terraform to create AWS EC2 instances, security groups, and to run Docker on the server automatically.
👉 In simple words:
Terraform lets you create cloud servers using code instead of clicking in the cloud console.
6️⃣ What is AWS EC2?
Answer:
AWS EC2 is a virtual server provided by Amazon where applications can run.
In my project, Terraform creates an EC2 instance and deploys my Dockerized Strapi app on it.
👉 In simple words:
EC2 is a cloud computer where my app runs.
7️⃣ What happens when you push code to GitHub?
Answer:
When I push code to the main branch, GitHub Actions runs the CI workflow.
It builds a new Docker image of my app and pushes it to Docker Hub.
👉 In simple words:
Pushing code automatically builds and uploads a new version of my app.
8️⃣ How does your app get deployed to AWS?
Answer:
I run the CD workflow manually.
Terraform then creates or updates the EC2 server, installs Docker, pulls the latest Docker image from Docker Hub, and runs the app.
👉 In simple words:
One click deploys my app to AWS automatically.
9️⃣ What is Infrastructure as Code (IaC)?
Answer:
Infrastructure as Code means managing cloud resources using code instead of manual setup.
Terraform is an example of IaC, where the server configuration is written in files.
👉 In simple words:
IaC means creating servers using code.
🔟 Why did you create a destroy workflow?
Answer:
The destroy workflow deletes all cloud resources created by Terraform.
This helps avoid unnecessary cloud costs and allows me to start fresh when testing.
👉 In simple words:
Destroy workflow safely deletes everything I created on AWS.