مثبت ProCourse

تم تصميم هذه الإضافة لتسهيل تثبيت الإضافات الجديدة بشكل كبير دون الحاجة لتسجيل الدخول إلى الخادم. تضيف هذه الإضافة شاشة تحت /admin/plugins/procourse-installer تبدو كالتالي:

من هناك، يمكنك إدخال عنوان URL (مع أو بدون .git) لمستودع Git الخاص بالإضافة والنقر على “تثبيت الإضافة”. انتظر بضع دقائق (حوالي 5 دقائق) حتى يكتمل التثبيت، وستكون جاهزًا للاستخدام.

لرؤية جميع الإضافات التي قمت بتثبيتها عبر المثبت أو لإزالة إضافة، انتقل ببساطة إلى “الإضافات المثبتة”.


بعض الملاحظات:

  • تظل هذه الإضافات موجودة حتى بعد إعادة البناء أو التمهيد (bootstrap) لـ app أو web_only.

  • لم يتم اختبارها حاليًا على حالات متعددة المواقع (multisite) ومن المرجح أن تفشل في هذه السيناريوهات، حيث تحتاج الإضافة إلى الوصول إلى مجلد /plugins الخاص بالتطبيق لتعمل بشكل صحيح.

  • ستظهر الإضافات المثبتة تحت /admin/plugins.

  • يمكنك ترقية هذه الإضافات بشكل طبيعي من /admin/upgrade.

  • أثناء بناء هذه الإضافة، اكتشفنا خطأ محتملاً عند إزالة الترجمات من الإضافات. قد يتسبب ذلك في ظهور خطأ في الموقع إذا زار المستخدم صفحة تستخدم فيها الترجمة. يبدو أن هذا يحدث حتى لو استخدمت admin/upgrade لترقية إضافة معينة وقامت الإضافة بإزالة ترجمة. نحن نعمل حاليًا على إيجاد حل لهذه المشكلة.


المتطلبات:

  • يجب أن تعمل على تثبيت Docker مدعوم.

  • يجب تثبيت إضافة Docker Manager.

  • الوصول إلى /admin/upgrade.


يمكن العثور على المستودع هنا:

https://github.com/procourse/procourse-installer

43 إعجابًا

Wow! That’s quite an accomplishment! I thought it couldn’t be done. Nice work, @joebuhlig!

EDIT: Here’s a question. If you do a rebuild at the command-line, are the procourse-installer plugins upgraded?

11 إعجابًا

Yes – plugins should get upgraded upon bootstrap.

7 إعجابات

Just wow!
Nice work!

إعجابَين (2)

IMO, this deserves to be in core.

11 إعجابًا

So, would it be worth removing my existing plugins from the app.yml file and moving them to this installer?

إعجاب واحد (1)

I have to admit that I’m conflicted on this one. It would really cool to be in core but if it’s in core, installing plugins will only work on Docker installs and non-multisite installs. That would cause problems for a quite a lot of instances.

Technically, it doesn’t matter. They end up being installed in exactly the same way. This just makes it easier to do.

8 إعجابات

I assume the challenges associated with getting it to work with multisite are far more complex then getting to set up multisite (which none of my clients have deployed) and I’m saying that from managing over 2 dozen active discourse installations.

It should be easier to include this in the standard app.yml on bootstrap for the standalone installs and not including the same in a multisite/multi container/HA setup.

It could always be part of core (with a big warning label that says “only works with docker”) but leave the current install method available as well.

Even better if there’s a way to detect a compatible installation and hide or show itself as necessary.

5 إعجابات

The main challenge is precompiling assets and such. We’re effectively adding the repo to the /plugins and then running an docker manager upgrade on that specific plugin. That handles the magic side of it.

But in a multisite, you run into issues because you don’t want one instance to be able to make edits for all instances in the multisite.

6 إعجابات

How i can uninstall a plugin using ssh? Because i installed Moderator Extension and now I cant put it anymore online, Error 502

Assuming you can’t get to the admin panel:

  1. SSH into the server.
  2. cd /var/discourse
  3. ./launcher enter app
  4. vim /shared/tmp/procourse-installer/plugins.txt
  5. Remove the offending plugin from the file.
  6. exit
  7. ./launcher rebuild app
4 إعجابات

Cant up online :cry:

Looks like your container isn’t running. Try this ./launcher start app

3 إعجابات

Thank You, my error 502 now are resolved. :smiley:

إعجابَين (2)

I think the installer is working fine but I saw this in my error log, not sure if it’s anything but thought I’d might as well bring it up:

NameError (uninitialized class variable @@install_state in ProcourseInstaller::InstallController)
/var/www/discourse/plugins/procourse-installer/app/controllers/procourse_installer/install_controller.rb:4:in `status'
إعجابَين (2)

Interesting. Do you have any guesses about what you were doing when that error came to be?

إعجاب واحد (1)

Some 20 or so days ago, I installed this Procourse plugin, and another plugin (I forgot which one was it) thru this plugins interface.
After a few days, I found that many times (say once every few days) my website went dead slow. On those moments, even safe mode opening went equally slow. And after 20-30 minutes I found that the speed of my site became normal.

Although I have not got necessary skills to diagnose the logs, but since the logs’ (or was it sidekiq?) warning section contained ‘procourse’ so many times, I thought it is somehow related to this plugin installed inside/thru procourse plugin. So I uninstalled that plugin from procourse interface.

But yesterday it again (almost) crashed.
I checked and again found the word ‘procourse’ written in many many warnings in logs.

So today I decided and uninstalled procourse too.

Now my fingers are strongly crossed.

Can you share the backtrace of one of those errors? That would help us narrow down where it’s coming from.

إعجاب واحد (1)

Since I have Uninstalled the plugin for the time being. I can have the logs sent only when next occurrence occurs.

(I don’t know if logs are kept for 2-3 days or not, if they are, then I can try).

Thanks.