I’m searching for a solution that don’t make me rebuild my Discourse when I install a new plugin, which cause a long downtime.
On some forum scripts (like PHPBB, FluxBB, etc…), we can install a plugin without causing a downtime.
I’m also looking for a solution to set a message when the users visits my rebuilding Discourse who says that the forum is currently in maintainance (instead of the web browser error).
The solution is to use a two-container install. This will let you build a new image while the old one keeps running. The amount of downtime is just what it takes to shutdown the old container and start the new one.
Yes, I’ve experimented with having HAproxy in front of two containers, so it should be possible to leave the old server running, crank up the new one, shut down the old one with no downtime. I’ve not yet gotten it working correctly, however.
Entschuldigung für das Necroposting, aber dieser Beitrag erscheint bei Google weit oben und ich hatte das gleiche „Problem“. Es erfordert etwas Herumprobieren im Docker-Container, daher würde ich dies nicht in der Produktion durchführen, wenn du nicht genau weißt, was du tust. Schritte nach dem SSH-Zugriff auf deinen Server: DU FÜHRST UNTERSTÜTZUNGSFREIE AKTIONEN DURCH, OHNE JEGLICHE GARANTIE!
# cd /var/discourse
# ./launcher enter app
# su discourse
$ cd /var/www/discourse/plugins
$ git clone <plugin_git_url>
$ exit
# exit
# docker restart app
Es gibt zwar noch eine kurze Ausfallzeit, während der Container startet, aber das ist viel schneller als ein vollständiger Neuaufbau (Sekunden gegenüber Minuten auf der kleinsten DigitalOcean-Droplet).