Skip to content

Repository files navigation

Full CI/CD Pipeline using GitHub Actions, Docker, Terraform and AWS EC2

Overview

This project demonstrates a complete DevOps CI/CD pipeline for a Node.js application using:

  • GitHub Actions
  • Docker
  • Docker Hub
  • Terraform
  • AWS EC2
  • Docker Compose

The pipeline automatically:

  1. Runs tests
  2. Builds Docker image
  3. Pushes image to Docker Hub
  4. Creates infrastructure using Terraform
  5. Deploys containerized application to AWS EC2

Tech Stack

  • Node.js
  • Docker
  • Docker Compose
  • GitHub Actions
  • Terraform
  • AWS EC2
  • Ubuntu Server

CI/CD Workflow

GitHub Push
    ↓
GitHub Actions
    ↓
Run Tests
    ↓
Terraform Apply
    ↓
Docker Build
    ↓
Docker Hub Push
    ↓
Deploy to EC2

Features

  • Automated CI/CD pipeline
  • Infrastructure as Code using Terraform
  • Containerized Node.js application
  • Docker Compose deployment
  • Auto deployment on push to main branch
  • AWS EC2 provisioning
  • Docker Hub integration

Docker Hub

Docker Image:

ayushsingh0/devops-project:v1

GitHub Actions Workflow

Workflow File:

.github/workflows/deploy.yml

Terraform Commands

Initialize Terraform

terraform init

Apply Infrastructure

terraform apply -auto-approve

Destroy Infrastructure

terraform destroy -auto-approve

Run Docker Locally

Build Image

docker build -t devops-project .

Run Container

docker run -p 3000:3000 devops-project

Future Improvements

  • NGINX Reverse Proxy
  • HTTPS with Certbot
  • Monitoring using Prometheus & Grafana
  • Kubernetes Deployment
  • AWS ECS Migration
  • Terraform Remote Backend

Author

Ayush Singh

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages