Cloudflare DNS + Dockerized NGINX on AWS

🌐 Cloudflare DNS + Dockerized NGINX on AWS
Launching a website isn't enough — it should be automated, secure, and built like infrastructure. This project uses Dockerized NGINX on an AWS EC2 instance, paired with Cloudflare DNS and an API-driven TLS workflow to serve https://haelectricinc.com reliably and securely.


🧰 What It Does
Serves a static business website using Docker and NGINX:
✅ Runs NGINX inside a Docker container
🌍 Uses Cloudflare DNS for global name resolution
🔒 Automates TLS with Certbot and Cloudflare API (DNS-01 challenge)
🔁 Auto-renews certificates and reloads NGINX with no downtime
📶 Hosted on AWS EC2 with firewall, health checks, and monitoring


⚙️ Requirements

  • AWS EC2 (Ubuntu)

  • Docker + Docker Compose

  • Cloudflare account and API token

  • Certbot Docker image with DNS plugin

  • NGINX container with mounted HTML/CSS


📫 Why It Matters
Static websites still deserve DevOps-grade deployment. This setup is:
✔️ Fully containerized and portable
✔️ TLS-secured using DNS automation — no ports needed
✔️ Designed for simplicity, uptime, and zero-touch renewals
✔️ Perfect for small business sites, portfolios, and DevOps learning labs