كيفية تثبيت إضافة دون إعادة البناء (أو تعيين رسالة صيانة)

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!

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:

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.

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?

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.

Can you tell me what kind of issues you had?

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

عذراً على إحياء الموضوع، لكن هذا المنشور يظهر في نتائج بحث جوجل، وكنت أواجه “المشكلة” نفسها. يتطلب الأمر بعض التجريب داخل حاوية 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).

مرحبًا!
من المرجح أنك تبحث عن هذا:

يمكنك أيضًا

  sv restart unicorn 

داخل الحاوية، وهو أسرع قليلاً من إعادة تشغيل الحاوية.

أيضًا، لبعض الإضافات، ستحتاج إلى ترحيل قاعدة البيانات.