プラグインを再ビルドせずにインストールする方法(またはメンテナンスメッセージを設定する方法)

Hi.

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).

Thanks!

「いいね!」 1

It’s really not possible to install a plugin without rebuilding afaik.

This can be done by setting up an offline page while rebuilding here is a guide:

「いいね!」 2

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.

「いいね!」 7

Thanks, I will follow your solution.

A more advanced version can include a load balancer in front of the application container(s) to reduce downtime to a bare minimum right?

「いいね!」 1

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.

「いいね!」 1

Can you tell me what kind of issues you had?

「いいね!」 1

I’ll need to crank it up again and document it. It’ll take a while to figure it out again. :frowning:

「いいね!」 1

スレッドの掘り起こしで申し訳ありませんが、この投稿が Google で上位に表示されているため、私も同じ「問題」に直面しました。Docker コンテナ内での操作が必要になるため、何をしているか分からない場合は本番環境での実施はお勧めしません。サーバーに SSH で接続した後の手順は以下の通りです:
サポートされていない操作を行います。いかなる保証もいたしません!

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

コンテナの起動中は少しダウンタイムが発生しますが、フルリビルドに比べるとはるかに高速です(最小構成の DigitalOcean ドロップレットでも数分ではなく数秒)。

「いいね!」 3

こんにちは!
おそらく、こちらをお探しのようです:

「いいね!」 1

コンテナ内で

  sv restart unicorn

を実行することもできます。これはコンテナ自体を再起動するよりもわずかに高速です。

また、一部のプラグインではデータベースのマイグレーションが必要になります。

「いいね!」 3