https://github.com/thecraftman/static-website
Static Website Deployment with Kubernetes and Nginx
https://github.com/thecraftman/static-website
Last synced: 6 months ago
JSON representation
Static Website Deployment with Kubernetes and Nginx
- Host: GitHub
- URL: https://github.com/thecraftman/static-website
- Owner: thecraftman
- Created: 2025-04-06T19:27:30.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-06T19:56:20.000Z (6 months ago)
- Last Synced: 2025-04-06T20:33:43.168Z (6 months ago)
- Language: HCL
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static Website Deployment
A Kubernetes-based static website deployment system with Traefik server, Nginx, and Terraform
## Overview
- Static website hosting on Kubernetes with environment variable injection
- Self-signed HTTPS and secret management
- Separate dev/prod environments
- Local deployment using Docker Desktop Kubernetes
- Cloud deployment using AWS EKS via Terraform## Prerequisites
- Docker Desktop with Kubernetes enabled
- kubectl
- Helm
- Git
- AWS CLI (for EKS deployment)
- Terraform (for EKS deployment)## Local Deployment
```bash
# 1. Clone the repository
git clone https://github.com/thecraftman/static-website.git
cd static-website# 2. Bootstrap the environment
./scripts/bootstrap-kubernetes.sh# 3. Generate self-signed certificates
./scripts/generate-certificates.sh# 4. Add hosts file entries
# Add to /etc/hosts (Linux/Mac) or C:\Windows\System32\drivers\etc\hosts (Windows):
# 127.0.0.1 dev.static-website.local
# 127.0.0.1 static-website.local# 5. Deploy to development
./scripts/deploy.sh dev --build# 6. Deploy to production
./scripts/deploy.sh prod
```### Access at:
- Development: https://dev.static-website.local
- Production: https://static-website.local