Ask HN: A Better Docker Compose?
I’ve been spending a week trying to learn how to deploy a collection of containers (my web app, a Postgres DB, and some microservices) to AWS and I am still so lost.<p>The first solution I happened upon was serverless. Specifically SST, which is written with AWS CDK, but you must develop on live services and I just can’t justify paying to develop.<p>Then I found Serverless Framework, which is an abstraction on CloudFormation, but the offline solutions like localstack get a lot of flack for being buggy and localstack charges for some services. I also looked into Architect but the documentation is abysmal.<p>Then I figured serverful might be the easier way to go. I found that docker compose has a built in integration with AWS ECS where it transforms your yaml into Cloudformation to provision the right services. However, it seems to just be missing key parts like custom domain and SSL certificate provisioning which seems to defeat the IaC ethos.<p>Then I figured I might go with Terraform and I found some seemingly good starters like <a href="https:&#x2F;&#x2F;github.com&#x2F;aws-ia&#x2F;terraform-aws-ecs-blueprints">https:&#x2F;&#x2F;github.com&#x2F;aws-ia&#x2F;terraform-aws-ecs-blueprints</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;cloudposse&#x2F;terraform-aws-ecs-web-app">https:&#x2F;&#x2F;github.com&#x2F;cloudposse&#x2F;terraform-aws-ecs-web-app</a> <a href="https:&#x2F;&#x2F;github.com&#x2F;turnerlabs&#x2F;terraform-ecs-fargate">https:&#x2F;&#x2F;github.com&#x2F;turnerlabs&#x2F;terraform-ecs-fargate</a> but the examples are just lacking. They don’t have any examples for multiple containers that can access each others’ resources that I can find. Reading these templates has at least given me a better idea of the resources I need to provision in AWS but the networking and configuration still frighten me. Like do I need to configure nginx with a reverse proxy myself? How do I orchestrate that container with the others? And apparently services can crash and just not restart? And I need to make sure to configure volumes for data that needs to persist. And setting up the CI&#x2F;CD seems daunting.<p>I’ve also heard about docker swarm, kubernetes, pulumi, AWS SAM, etc but it’s a lot to learn. When I go on Discords for web frameworks, mostly everyone including the devs of these frameworks use 2nd tier managed providers like Vercel, Fly, Netlify, Supabase, Cloudflare, etc. But many of those are just not as reliable as core cloud providers, the cost is way higher, and now you’re setting up a local stack that probably wildly differs from how it will work in production between those services. Glad to see I’m not alone in a very reasonable expectation of a simple way to orchestrate multiple containers on AWS, what must be the most common use case web developers have