Skip to content

This project automates the deployment of a static website using Terraform, Docker, and cloud services (AWS & Azure). It enables learning Infrastructure as Code (IaC), cloud automation, and containerization with Next.js and TailwindCSS. πŸš€πŸ’‘

License

Notifications You must be signed in to change notification settings

PrayagRaj22/Static-Website-Cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Static Website Deployment with Terraform, Docker & Cloud πŸŒπŸš€πŸ’‘

This project demonstrates the deployment of a static website using Terraform, Docker, and Cloud services. It serves as a learning resource for Infrastructure as Code (IaC) principles and Cloud deployment strategies. πŸŒπŸ“šβœ¨

πŸ“Œ Project Overview πŸ”βš‘πŸ“Š

  • Infrastructure as Code (IaC) using Terraform
  • Containerized Deployment with Docker
  • Cloud Hosting: Deploying a static website on AWS or Azure
  • Automation: Managing cloud infrastructure programmatically
  • Scalability: Learning how to scale static web hosting

πŸš€ Features πŸŽ―πŸ“ˆπŸ’Ύ

  • Fully automated deployment using Terraform
  • Containerized website using Docker
  • Static website built with Next.js and TailwindCSS
  • Hosted on AWS S3 + CloudFront or Azure Blob Storage + Azure CDN
  • HTTPS support (if configured with CloudFront/Azure CDN)
  • Version-controlled infrastructure

πŸ› οΈ Technologies Used πŸ’»β˜οΈπŸ”§

  • Next.js: React-based framework for static site generation
  • TailwindCSS: Utility-first CSS framework for styling
  • Terraform: Infrastructure as Code (IaC) tool
  • Docker: Containerization for easy deployment
  • AWS: S3 (for storage) and CloudFront (for CDN)
  • Azure: Blob Storage (for storage) and Azure CDN (for CDN)
  • GitHub Actions (Optional): CI/CD automation for infrastructure deployment

πŸ—οΈ Deployment Steps πŸπŸ”„πŸ“€

  1. Clone the Repository
    git clone https://github.com/PrayagRaj22/Static-Website-Cloud.git
    cd Static-Website-Cloud
  2. Initialize Terraform
    terraform init
  3. Plan Deployment
    terraform plan
  4. Apply Configuration
    terraform apply -auto-approve
  5. Build & Deploy Next.js Website using Docker
    cd website
    docker build -t static-website .
    docker run -d -p 3000:3000 static-website
  6. Access the Website
    • Get the website URL from Terraform output
    • Open in your browser πŸŽ‰πŸŽŠπŸŒ

🧹 Cleanup πŸ—‘οΈβŒπŸ”„

To destroy the infrastructure and remove resources:

terraform destroy -auto-approve

To stop and remove the Docker container:

docker stop static-website

πŸ“– Learning Outcomes πŸŽ“πŸ“˜πŸ’‘

  • Understand how Terraform provisions Cloud infrastructure
  • Learn how to deploy a Next.js + TailwindCSS static website on AWS or Azure
  • Use Docker for containerized deployment
  • Automate infrastructure management with IaC
  • Implement best practices for infrastructure deployment

πŸ“œ License πŸ“βš–οΈβœ…

This project is licensed under the MIT License.

πŸ™Œ Contributing πŸ€πŸ’‘πŸ”„

Feel free to open issues or submit pull requests to improve this project.


This project is for educational purposes only and is meant to help learners understand Terraform, Docker, Cloud, and modern web development. πŸ“šπŸš€πŸ’‘

About

This project automates the deployment of a static website using Terraform, Docker, and cloud services (AWS & Azure). It enables learning Infrastructure as Code (IaC), cloud automation, and containerization with Next.js and TailwindCSS. πŸš€πŸ’‘

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published