https://github.com/prayagraj22/static-website-cloud
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. ๐๐ก
https://github.com/prayagraj22/static-website-cloud
aws aws-cloudfront aws-s3 azure azure-blob-storage azure-cdn cloud docker good-first-issue open-source project terraform
Last synced: 3 months ago
JSON representation
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. ๐๐ก
- Host: GitHub
- URL: https://github.com/prayagraj22/static-website-cloud
- Owner: PrayagRaj22
- License: mit
- Created: 2025-03-08T01:17:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-08T01:44:12.000Z (over 1 year ago)
- Last Synced: 2025-03-08T02:24:19.994Z (over 1 year ago)
- Topics: aws, aws-cloudfront, aws-s3, azure, azure-blob-storage, azure-cdn, cloud, docker, good-first-issue, open-source, project, terraform
- Language: JavaScript
- Homepage:
- Size: 51.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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**
```bash
git clone https://github.com/PrayagRaj22/Static-Website-Cloud.git
cd Static-Website-Cloud
```
2. **Initialize Terraform**
```bash
terraform init
```
3. **Plan Deployment**
```bash
terraform plan
```
4. **Apply Configuration**
```bash
terraform apply -auto-approve
```
5. **Build & Deploy Next.js Website using Docker**
```bash
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:
```bash
terraform destroy -auto-approve
```
To stop and remove the Docker container:
```bash
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. ๐๐๐ก_