/var/discourse フォルダ内のランチャーコマンドは、それ自体で意味がわかりません

Siteground のメールサービスのトラブルシューティングのため、設定を変更してリロードを数回行いました。最も迅速に行う方法について複数のアドバイスがありましたが、それらをすべてまとめると混乱を招く結果となりました。
そこで、以下のコマンドの違いについて、より詳しくご教示いただけますでしょうか。

インストールガイド やこのフォーラムの投稿に記載されている情報は、どこか一貫していません。例えば、「コンテナの初期化」と「コンテナのビルド」の違いが明確に理解できていません。
app.yml などを変更した場合にどのコマンドを実行すべきかを示す「エスカレーションの段階」があるはずです。ある人は start で十分だといい、別の人は rebuild が必要だと言い、さらに ./discourse-setup も実行すべきだとする人もいます。

コマンド一覧:
    start:      コンテナの起動/初期化
    stop:       実行中のコンテナの停止
    restart:    コンテナの再起動
    destroy:    コンテナの停止と削除
    bootstrap:  テンプレートに基づいた設定でコンテナをブートストラップ
    rebuild:    コンテナの再構築(古いものを削除し、ブートストラップして新規起動)

次第に、すべてのコマンドが連続したアクションの連鎖のように思えてきました。
各 successive なステップ/コマンドは、その前のステップと同じことを行いつつ、さらに何かを追加して行うもののようです。

例えば、以下のようなイメージです。

  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日後に自動的に閉じられました。返信はもう許可されていません。