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

**URL:** https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282
**Category:** Self-hosting
**Created:** [8월 20, 2019, 1:26오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282 "2019-08-20T13:26:57Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 20, 2019, 1:26오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/1 "2019-08-20T13:26:57Z")

</div>

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](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md#edit-discourse-configuration) 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`

```plaintext
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

2. stop

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [8월 21, 2019, 4:10오전 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/2 "2019-08-21T04:10:19Z")

</div>

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

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 21, 2019, 2:01오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/3 "2019-08-21T14:01:30Z")

</div>

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 😕

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [8월 21, 2019, 2:07오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/4 "2019-08-21T14:07:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 21, 2019, 2:08오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/5 "2019-08-21T14:08:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [8월 21, 2019, 2:09오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/6 "2019-08-21T14:09:38Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 21, 2019, 2:17오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/7 "2019-08-21T14:17:11Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [8월 21, 2019, 3:17오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/8 "2019-08-21T15:17:26Z")

</div>

If you need to know what each command does _exactly_ you can read it here: [https://github.com/discourse/discourse\_docker/blob/master/launcher](https://github.com/discourse/discourse_docker/blob/master/launcher)

---

<div class="post-metadata">

### Author: ![PackElend](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/packelend/32/95294_2.png) [@PackElend](https://meta.discourse.org/u/PackElend)
#### Post date: [8월 21, 2019, 7:12오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/9 "2019-08-21T19:12:10Z")

</div>

thanks that helps 🙂  
There is [once mentioned setup](https://github.com/discourse/discourse_docker/blob/c147b525919a90a524591c18245b5c9c3cdaf291/launcher#L490), is it related to `./discourse-setup`?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [3월 7, 2023, 6:01오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/10 "2023-03-07T18:01:31Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 7, 2023, 6:19오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/11 "2023-03-07T18:19:11Z")

</div>

이제 조금 더 완성되었습니다:

```plaintext
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start: 컨테이너 시작/초기화
    stop: 실행 중인 컨테이너 중지
    restart: 컨테이너 재시작
    destroy: 컨테이너 중지 및 제거
    enter: 컨테이너 내부에서 명령을 실행하기 위해 셸 열기
    logs: 컨테이너의 Docker 로그 보기
    bootstrap: 템플릿을 기반으로 구성에 따라 컨테이너 부트스트랩
    run: 마지막에 부트스트랩된 이미지의 컨텍스트에서 구성과 함께 주어진 명령 실행
    rebuild: 컨테이너 재빌드 (기존 제거, 부트스트랩, 새 컨테이너 시작)
    cleanup: 24시간 이상 중지된 모든 컨테이너 제거
    start-cmd: 컨테이너 시작에 사용되는 docker 명령 생성

Options:
    --skip-prereqs 런처 사전 요구 사항 확인 안 함
    --docker-args docker 실행 시 전달할 추가 인자
    --skip-mac-address MAC 주소 할당 안 함
    --run-image 컨테이너 실행에 사용할 이미지 재정의
root@monstera:/var/discourse# 

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [3월 20, 2023, 1:00오후 UTC](https://meta.discourse.org/t/the-launcher-command-in-the-var-discourse-folder-are-not-self-explaining/126282/12 "2023-03-20T13:00:27Z")

</div>

이 주제는 12일 후 자동으로 닫혔습니다. 더 이상 새 답글을 작성할 수 없습니다.
