How to install a plugin without rebuilding (or set a maintainance message)

Sorry for necro, but this post appears high in Google and I had the same “problem”. It requires fooling around in the docker container, so I’d not recommend doing this on production if you don’t know what you are doing. Steps after sshing into your server:
YOU’RE DOING UNSUPPORTED STUFF, NO WARRANTY OF ANY KIND!

# cd /var/discourse
# ./launcher enter app
# su discourse
$ cd /var/www/discourse/plugins
$ git clone <plugin_git_url>
$ exit
# exit
# docker restart app

There is still some downtime while the container starts, but it’s much faster than a full rebuild (seconds vs minutes on the smallest DigitalOcean droplet).