I’ve read threads like this and others, and it seems like to date, there’s no easy way to pop a Discourse image into something like ECS, or GKE or whatever container orchestration you like and have it work easily…
I use Terraform to manage an Elasticache cluster, an RDS instance, and an ECS cluster. I just want to be able to say, “Here’s my Discourse image, and here are the environment variables to connect to Postgres, Redis, SMTP, etc.”
Does anything like this exist in 2020? It seems like in all the conversations around this topic previously, no satisfying resolution was reached, and we’re still stuck with Discourse’s custom scripts that defy container conventions and break compatibility with the idiomatic way people use containers…
Why’s that require this weird bootstrap script that launches containers and acts as an orchestrator though?
Why can’t the Discourse image accept env variables and in its entrypoint reach out to all those resources and create the tables it needs, etc.? Other services / web apps that rely on external persistence tiers have been successfully containerized in this way. You just pop them into an ECS or EKS or whatever, tell them where to find the database, etc., and it all works great. Is this possible with Discourse?
It’s because we’re the opposite—a non-profit org without tons of budget—that we want to keep things as cheap as possible by throwing all our enterprise apps onto a single AWS ECS host. But that requires that the individual apps are neatly containerized and can be defined as ECS task definitions, i.e., self-contained Docker images.
Well, sort of – given that Discourse easily fits into a $5/month VPS as a straightforward single Docker install image, I’m not sure squeezing a few pennies out of that number – with a massive increase in install difficulty and ongoing maintenance complexity – is really worth the hassle? Keep it simple!