In a discussion about hosting multiple Discourse instances, user helmi asks if running multiple standalone Docker containers on a single VM is a viable alternative to a multisite installation. They specifically wonder about the resource implications of having separate Redis and PostgreSQL instances for each container and if this setup causes issues. riking initially suggests following a guide for running other websites on the same machine. However, helmi clarifies that they already understand reverse proxying and are specifically concerned about Discourse’s internal handling of multiple database and cache daemons. riking explains that both architectures are possible: a “2-web 1-data” setup requires different database names, while a “2-standalone” approach avoids configuration conflicts but may perform extra work. They recommend a minimum of 2GB RAM with swap. helmi confirms they have a 4GB VM with swap on bare metal, concluding that resources are not a concern and they will proceed with the standalone container approach.
to be honest i’m not so much into docker for now but i was wondering if it could probably be a good alternative to a multisite installation to have just multiple standalone containers next to each other on one VM. Name based hosting could be solved with an reverse proxying nginx and some stuff that is “global” in multisite installation (like the admin email-accounts, smtp settings and other stuff) could be easily separated here.
Is there anything that would make this a problem? Probably the multiple instanced of Redis or Postgresql (that’s where i’m lacking knowledge in relation to Docker).
Thanks, riking, but you probably just got me wrong. I know about the reverse proxying and could get it to work without a problem i think (thanks anyway for posting that link).
My question was more about discourse itself in multiple instances. Is it suitable to have standalone-container. each with their own Redis and Postgresql instance or does this probably eat up too much resources or cause trouble? I’m relatively new to docker so i’m not sure how multiple instances of the same daemons get handled and if it’s a good idea.
You could go either way, really. If you do 2-web 1-data, you’ll have to set different database names. If you do 2-standalone you don’t really have to worry about anything, but it might be performing extra work. It’s your call.
ok great, thanks. I’m currently on a 4GB VM with swap but resources aren’t the biggest problem here as the bare metal machine itself is mine and has some resources left. I’ll try around that way.