Discourse docker container resource limits


(Sam) #1

Docker has a feature that allows you to set a CPU and RAM limit on a container. For example:

docker run busybox --cpuset="0,1" -m 4g

That would limit the container to cpu0 and cpu1 and 4 gigs of RAM.

Is there a way to configure this with the Discourse bootstrapping script? We have a big server but want to isolate each docker container using memory and cpu limits.


(Sam Saffron) #2

You will need to amend launcher to support this, PR welcome


(Sam) #3

Hey @sam,

I just made a pull request, please check it out: Add --docker-args option to the launcher script by samdroid-apps · Pull Request #105 · discourse/discourse_docker · GitHub


(Jeff Atwood) #4