A Terraform module to deploy Docker containers or Compose files to any cloud VM using cloud-init, with Traefik and Let's Encrypt.
christippett/terraform-cloudinit-container-server is a Terraform module that generates a cloud-agnostic cloud-init configuration to bootstrap a virtual machine with Docker and deploy either a single container image or a full Docker Compose stack. It simplifies deploying containerized applications across major cloud platforms like AWS, GCP, Azure, and DigitalOcean, offering a cost-effective and vendor-independent alternative to managed container services.
DevOps engineers and developers who need to deploy containerized applications across multiple cloud providers using Infrastructure as Code (IaC) and want to avoid vendor lock-in. It is particularly suited for those managing small hobby projects, proofs of concept, or experimental workloads on cost-effective VMs.
Developers choose this module because it provides a portable, multi-cloud deployment solution using standard tools like Terraform, Docker, and cloud-init, with built-in Traefik for routing and automatic TLS certificates from Let's Encrypt. It eliminates the complexity of proprietary frameworks and external dependencies, focusing on simplicity and self-hosting.
A batteries included cloud-init config to quickly and easily deploy a single Docker image or Docker Compose file to any Cloud™ VM.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses cloud-init to deploy identical configurations across AWS, GCP, Azure, and DigitalOcean, with examples provided for each, eliminating vendor lock-in.
Integrates Traefik for routing and service discovery, plus automatic Let's Encrypt certificate provisioning, simplifying SSL setup for containerized apps.
Easy to configure via Terraform with customizable templates and input variables, enabling infrastructure-as-code workflows without proprietary tools.
Targets low-cost VMs (e.g., AWS t3a.micro at $4.76/month), making it an economical alternative to managed services for hobby projects or POCs.
Deploys all containers to one VM with no built-in redundancy, scaling, or failover mechanisms, limiting reliability for critical workloads.
Requires manual setup of Traefik labels in Docker Compose files, which the README admits can be 'intimidating' for users unfamiliar with the tool.
Limited to Docker Compose on a single instance; does not integrate with Kubernetes or other platforms for advanced deployment features.
Terraform cloud-init config is an open-source alternative to the following products:
A fully managed compute platform on Google Cloud that automatically scales stateless containers in response to HTTP requests or events.
AWS Fargate is a serverless compute engine for containers that works with both Amazon ECS and Amazon EKS, allowing you to run containers without having to manage servers or clusters.