The launcher command in the /var/discourse folder are not self-explaining

I had to change and reload the configuration a couple of times for troubleshooting Siteground mail service. There are multiple bits of advice on how to do it most quickly.
Summarizing all of them leaves confusion.
So, could you tell me the differences between the commands listed below in more detail?

The information in install guide and posts in this forum are somehow inconsistent. It isn’t fully clear what e.g. is the difference between initializing and building a container.
There should be a ladder of escalation telling what actions requires what command if you change e.g. app.yml as some tell start is enough other say you have to rebuild or do also ./discourse-setup

Commands:
    start:      Start/initialize a container
    stop:       Stop a running container
    restart:    Restart a container
    destroy:    Stop and remove a container
    bootstrap:  Bootstrap a container for the config based on a template
    rebuild:    Rebuild a container (destroy old, bootstrap, start new)

I’m slowly building up the impression that all the commands are a follow-up sequence of actions.
Each successive step/command does the same as it pre-successor plus something extra.

for example something like this

  1. start-up

    1. bootstrap: destroy old + Bootstrap a container for the config based on a template
    2. rebuild: bootstrap + Rebuild a container (start new), meaning it does things like downloading the latest versions of software and implementing updated config
    3. start: initialize, whatever it means
  2. stop

    1. stop: Stop a running container
    2. restart: Restart a container (incl. stop)
    3. destroy: Stop and remove a container
「いいね!」 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: https://github.com/discourse/discourse_docker/blob/master/launcher

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