Skip to content

MisaelTox/HexGL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HexGL: Cloud Deployment Edition 🏎️💨

CI/CD AWS Terraform Docker

Professional cloud deployment of HexGL, a futuristic WebGL racing game, showcasing IaC, containerization, and automated CI/CD on AWS.

🎮 Play the game live on AWS S3


📸 Preview

Game Preview


🏗️ Architecture

AWS Architecture Diagram

Component Technology
Hosting AWS S3 Static Website
IaC Terraform
Containerization Docker + Nginx
CI/CD GitHub Actions
Region eu-north-1 (Stockholm)

🔄 CI/CD Pipeline

Every push to master automatically validates the infrastructure and syncs the game to S3:

Push to master
      ↓
✅ terraform fmt      → format validation
✅ terraform validate → syntax check
✅ terraform plan     → AWS impact preview
      ↓
⏸️  Manual approval gate (production environment)
      ↓
🚀 terraform apply    → provision infrastructure
🚀 aws s3 sync        → deploy game files to S3

AWS credentials stored as GitHub Secrets — never hardcoded.


🚀 Local Development (Docker)

docker build -t hexgl-game .
docker run -d -p 8080:80 hexgl-game
# Access at http://localhost:8080

☁️ Cloud Deployment (Terraform)

cd terraform
terraform init
terraform apply

📝 Lessons Learned

  • CI/CD with GitHub Actions — automated Terraform validation + S3 sync pipeline with manual approval gate for production.
  • Terraform race conditions — resolved 403 errors caused by S3 Bucket Policy applying before PublicAccessBlock finished updating, fixed with explicit depends_on.
  • AWS CLI authentication — debugged credential precedence issues with legacy SSO sessions, resolved using temporary environment variables for eu-north-1.
  • S3 static hosting — configured index document routing for correct WebGL asset delivery.

Fork of BKcore/HexGL by Thibaut Despoulain. Cloud infrastructure and CI/CD pipeline added by MisaelTox.

About

Source code of HexGL, a futuristic HTML5 racing game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 76.7%
  • HTML 13.2%
  • CoffeeScript 6.1%
  • CSS 3.5%
  • HCL 0.5%