Has anyone experience with AWS EC2 Container Service?

AI-generated summary

The discussion revolves around running Discourse on AWS’s EC2 Container Service (ECS). Initially, riking reported issues with ECS due to configuration and database seeding problems. Two years later, uwe_keim inquired about any updates, but schungx explained that ECS manages the base OS and Docker, limiting root access, which Discourse requires. However, rootsh3ll pointed out that on EC2, root access is available, yet Discourse still doesn’t work on ECS.

sam intervened, stating that Discourse can work on ECS by bootstrapping an image, pushing it to a registry, and specifying environment variables and volumes. rootsh3ll and schungx acknowledged this, with schungx suggesting that the container must be pre-built with the exact configuration before being thrown into ECS. sam further clarified that many configurations can be provided via environment variables on a bootstrapped image. rootsh3ll plans to try this approach and write an article to help others.

Is anyone running Discourse on AWS’s new EC2 Container Service? Is it recommendable? Are there any known issues with managing them?

Thanks

And a little bit longer… ;oP

It doesn’t work, because of a couple reasons:

  • (principally) the bootstrapping process, where all your configuration is applied & the database seeded, involves running code in the container, stopping the container, then starting it again with a different pid1
  • backups are broken because the pg_dump binary is mismatched with the server
  • several other odd differences break other stuff, too (can’t remember right now)

Any update/improvement on this, two years later?

Or will this never ever work at all with EC2 Container Services?

not sure about container service but I am running discourse under docker along with a side on wordpress(non-dockerised) and not facing issues managing them. as it is being reverse-proxied by nginx to the discourse container.
so everything is organised.

A container service manages docker and the base OS for you AFAIK. You don’t have root access. You just throw a container in and the service runs it.

Discourse requires root access to config.

but on EC2 you do have root access.
As OP said discourse doesn’t work on ECS. I wonder why? even when you have root access.

AFAIK, ECS is simply EC2 running docker for you. so, I wonder why it cannot run discourse on ECS. whilst I am running discourse on EC2.

PS: don’t mind If I am wrong. I don’t know much about ECS

ECS takes away the OS and decker management from you. For example they manage all the upgrades and patches. You dont have to do those. So it is not a complete VM. It is a managed service. You only provide a container.

This way it’s impossible to run discourse on ECS. since discourse needs to be root

Can you explain why? Is there any post at meta that’s linked on this topic?

It will work fine on Ecs , bootstrap an image push to registry and then specify env and volumes

as sam confirms above, it should work on ecs.

That’s right. I suppose the container must be prebuilt outside for the exact config then thrown into ECS.

will try that and possibly write a thorough article for more people to come :slight_smile: Thanks sam

A lot of config can be provided via env on a bootstrapped image, majority of it