My Cloud-Native Deployment Stack
Cloudflare Tunnels
Secure connections, automatic SSL
Terraform
DNS management, infrastructure
Ansible
Server setup, deployments
Docker
Container orchestration
This is my personal favorite way to deploy applications. After years of managing deployments, I created this Infrastructure as Code repository to reproduce this exact setup on any server using Cloudflare tunnels for security, Terraform for infrastructure automation, Ansible for deployment orchestration, and Docker for containerization.
No exposed ports, zero downtime, enterprise-grade reliability with simple commands.
What this does: Installs all dependencies (Docker, Terraform, Ansible), runs Terraform to create tunnels, runs Ansible to configure your server completely.
One-time setup, then you're ready to deploy anything with a Dockerfile.
Terraform handles all the infrastructure automation - creating secure tunnels and managing DNS records so you never have to touch the Cloudflare dashboard again.
One terraform apply creates secure tunnels for all your apps with automatic SSL certificates.
Ansible handles the complete server setup AND all deployments. It configures everything from scratch, then manages zero-downtime updates with health checks and automatic rollbacks.
Handles everything: server setup, Traefik deployment, webhook service, and zero-downtime app deployments.
Just need: A repo with a Dockerfile and knowing what port your app uses.
Optional: Configure multiple apps in services.yaml for bulk operations, or deploy one-by-one with the command.
The webhook service is automatically deployed and secured during setup. It receives GitHub events and triggers zero-downtime deployments automatically.
Push to main branch → webhook triggers → Ansible deploys → zero downtime update complete.
Traefik dashboard is automatically deployed during setup and accessible at docker-dashboard.yourdomain.com
. Perfect for monitoring this deployment system.
Live Service Monitoring
- Real-time service routing visualization
- SSL certificate status per service
- Health check status monitoring
Traffic & Performance
- Request metrics per service
- Response time monitoring
- Traffic flow visualization
Secured with SSL and accessible through the same tunnel system as your apps. No additional configuration needed.
Here are the core scripts that power this deployment system. These examples show exactly how to build enterprise-grade automation with clean, maintainable code.
1. One-Command Server Setup
The setup-server.sh
script installs everything from scratch - Docker, Terraform, Ansible, Cloudflared, and configures the entire system.
2. Deploy Command Script
The deploy.sh
script handles the complete deployment workflow with elegant parameter validation and service management.
3. Complete Server Configuration
Ansible playbook that configures the entire server infrastructure - Docker networks, Traefik reverse proxy, and Cloudflared tunnel.
4. Zero-Downtime Blue-Green Deployment
Advanced deployment strategy that ensures zero downtime by running two versions side-by-side with health checks and automatic rollback.
These scripts demonstrate production-ready automation with proper error handling, health checks, and rollback capabilities. Each component works together to create a robust deployment pipeline.
Ready to Deploy?
Modern deployment stack with enterprise-grade features, simplified to 3 commands.