dachary is running a Discourse multisite setup with six instances, each on its own database and domain. Currently, adding a new instance requires rebuilding the entire container via ./launcher rebuild app, which takes minutes and causes downtime for all forums — an increasing problem as more instances are added. They’re seeking a HOWTO to add new instances dynamically without rebuilding. pfaffman suggests that if the database is already created and migrated and multisite.yml is updated inside the container, restarting Unicorn via sv restart unicorn might work — though it’s not straightforward. They recommend switching to a two-container setup (web + data) to allow bootstrapping a new instance while the old one remains live. pilou confirms understanding, referencing this guide on migrating to separate containers, which pfaffman confirms is the intended approach.
A discourse was setup as a multisite and runs six instances on six databases and six different domains. Every time a new instance is added, the container is rebuilt:
./launcher rebuild app
It takes a few minutes and while it is happening all forums are down. It has worked fine for the past few months and all is well. However, as the number of instances grow, the inconvenience of shutting down all of them every time a new one is added impacts an increasing number of users.
Is there a HOWTO to add a new forum instance dynamically instead of rebuilding the app?
If the database is created and migrated and the multisite.yml is updated in the container, you can just do a `sv restart unicorn’, but I don’t think there’s a way to do that easily.
What I think you want is a two-container install so you can do the bootstrap while the old container containues to run.