أوامر المشغل في مجلد /var/discourse ليست واضحة بذاتها

اضطررت إلى تغيير وإعادة تحميل الإعدادات عدة مرات أثناء استكشاف مشكلة خدمة البريد في Siteground. هناك العديد من النصائح حول كيفية القيام بذلك بأسرع طريقة ممكنة.
لكن تلخيص كل هذه النصائح يترك شعوراً بالارتباك.
لذا، هل يمكنك إخباري بالاختلافات بين الأوامر المذكورة أدناه بتفصيل أكبر؟

المعلومات الواردة في دليل التثبيت والمنشورات في هذا المنتدى غير متسقة إلى حد ما. ليس واضحاً تماماً، على سبيل المثال، ما الفرق بين تهيئة الحاوية وبناءها.
يجب أن يكون هناك سلم تصعيد يوضح أي إجراء يتطلب أي أمر عند تعديل ملف مثل app.yml، فالبعض يقول إن الأمر start كافٍ، بينما يقول آخرون إن عليك استخدام rebuild أو حتى تنفيذ ./discourse-setup أيضاً.

الأوامر:
    start:      تشغيل/تهيئة حاوية
    stop:       إيقاف حاوية قيد التشغيل
    restart:    إعادة تشغيل حاوية
    destroy:    إيقاف وإزالة حاوية
    bootstrap:  تهيئة حاوية للإعدادات بناءً على قالب
    rebuild:    إعادة بناء حاوية (إزالة القديمة، تهيئة جديدة، تشغيل جديدة)

أبدأ تدريجياً في تكوين انطباع بأن جميع الأوامر تمثل تسلسلاً متتابعاً من الإجراءات.
كل خطوة/أمر لاحق يقوم بنفس ما يفعله سابقه بالإضافة إلى شيء إضافي.

على سبيل المثال، شيء من هذا القبيل:

  1. التشغيل

    1. bootstrap: إزالة القديمة + تهيئة حاوية للإعدادات بناءً على قالب
    2. rebuild: bootstrap + إعادة بناء حاوية (تشغيل جديدة)، مما يعني أنه يقوم بأشياء مثل تنزيل أحدث إصدارات البرامج وتطبيق الإعدادات المحدثة
    3. start: التهيئة، مهما كان معناها
  2. الإيقاف

    1. stop: إيقاف حاوية قيد التشغيل
    2. restart: إعادة تشغيل حاوية (بما في ذلك الإيقاف)
    3. destroy: إيقاف وإزالة حاوية
إعجابَين (2)

I am not sure I am following here… can you make a PR with your proposed change?

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

I going to do a PR on GitHub but I need to understand each command in detail what is currently not the case.

Could you tell me, what each command triggers? I’ve read many posts in this regard but the information is not consistence.
A good example is start. Once it is said it is just used to stop and start the container if e.g. doing something on the host. In another topic it is mentioned that it initializes a container, whatever initialize means :confused:

Initialize means that if no container exists it will be created. If you stop and start, you’ll stop and start the same container with the same parameters (like smtp and other env settings), but if you destroy first, a new container with new env settings will be created, or initialized.

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

what is the difference between bootstrap and start if no container exits?

Bootstrap builds a new docker image,which is necessary to be able to “initialize” a running container.

Rebuild will always work. Sometimes it’s unnecessary, as a destroy and start is enough to make env settings (like smtp) take effect. But lots of people won’t really understand these intricacies, so it’s better to just tell them to always rebuild because it always works.

3 إعجابات

so ./discourse-setup is the least invasive command as it only recreates discourse’s software.

  1. Bootstrap from very scratch, begins with docker image
  2. start, from scratch, builds a container
  3. ./discourse-setup, runs discourse’s setup

what command is available to reapply config as

  1. defined in app.yml?
  2. referenced in app.yml?

assuming app.yml is the source of anything, so ./discourse-setup reads only this file to do its job.

If you need to know what each command does exactly you can read it here: discourse_docker/launcher at master · discourse/discourse_docker · GitHub

3 إعجابات

thanks that helps :slight_smile:
There is once mentioned setup, is it related to ./discourse-setup?

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

هذا مكتمل الآن أكثر قليلاً:

الاستخدام: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
الأوامر:
    start:       بدء/تهيئة حاوية
    stop:        إيقاف حاوية قيد التشغيل
    restart:     إعادة تشغيل حاوية
    destroy:     إيقاف وإزالة حاوية
    enter:       فتح واجهة أوامر لتشغيل الأوامر داخل الحاوية
    logs:        عرض سجلات Docker لحاوية
    bootstrap:   تهيئة حاوية للإعداد بناءً على قالب
    run:         تشغيل الأمر المحدد مع الإعداد في سياق آخر صورة تم تهيئتها
    rebuild:     إعادة بناء حاوية (إزالة القديمة، تهيئة، بدء جديدة)
    cleanup:     إزالة جميع الحاويات التي توقفت لمدة تزيد عن 24 ساعة
    start-cmd:   إنشاء أمر docker المستخدم لبدء الحاوية

الخيارات:
    --skip-prereqs             عدم التحقق من المتطلبات الأساسية للمشغل
    --docker-args              وسائط إضافية لتمريرها عند تشغيل docker
    --skip-mac-address         عدم تعيين عنوان mac
    --run-image                تجاوز الصورة المستخدمة لتشغيل الحاوية
root@monstera:/var/discourse# 
إعجابَين (2)

تم إغلاق هذا الموضوع تلقائيًا بعد 12 يومًا. لم تعد الردود الجديدة مسموح بها.