# Launcher rebuild app pull the latest discourse from github

**URL:** https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566
**Category:** Self-hosting
**Created:** [July 9, 2024, 11:30am UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566 "2024-07-09T11:30:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Celso\_Teixeira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/celso_teixeira/32/355969_2.png) [@Celso\_Teixeira](https://meta.discourse.org/u/Celso_Teixeira)
#### Post date: [July 9, 2024, 11:30am UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/1 "2024-07-09T11:30:16Z")

</div>

Hi,

I already have Discourse installed and running. Every time I rebuild the app, it pulls the launcher repo, the discourse/base Docker image, and the Discourse repository.

I want to limit this behavior so that the rebuild doesn’t check for updates and pull them automatically unless a specific parameter is passed.

Has anyone done something similar?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 9, 2024, 11:36am UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/2 "2024-07-09T11:36:06Z")

</div>

are you concerned about version stability?

why don’t you just switch to stable branch?

---

<div class="post-metadata">

### Author: ![Celso\_Teixeira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/celso_teixeira/32/355969_2.png) [@Celso\_Teixeira](https://meta.discourse.org/u/Celso_Teixeira)
#### Post date: [July 9, 2024, 11:43am UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/3 "2024-07-09T11:43:35Z")

</div>

I’m using stable version, 3.2.0.

The intention is to only pull from git hub or docker hub repository when we want, not everytime we rebuild the container.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 9, 2024, 11:45am UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/4 "2024-07-09T11:45:48Z")

</div>

Are you using a [standard install](https://meta.discourse.org/t/142537?silent=true)?

If so why just not run the rebuild command?

FYI updates to stable can be important - they usually contain vulnerability or significant bug fixes.

---

<div class="post-metadata">

### Author: ![Celso\_Teixeira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/celso_teixeira/32/355969_2.png) [@Celso\_Teixeira](https://meta.discourse.org/u/Celso_Teixeira)
#### Post date: [July 9, 2024, 12:59pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/5 "2024-07-09T12:59:09Z")

</div>

Yes, I’m using the standard standalone approach. I understand the need to keep the app updated. My idea is to add a flag to the launcher when I want to update the repository.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 9, 2024, 1:00pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/6 "2024-07-09T13:00:35Z")

</div>

If you want to restart the container without rebuilding, just do:

`./launcher restart app`

why do you need to rebuild _without_ updating - what is your goal?

stable updates are unlikely to introduce any breaking changes.

---

<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: [July 9, 2024, 1:08pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/7 "2024-07-09T13:08:46Z")

</div>

The point of stable is lack of change. Why are you rebuilding at all?

The reason that it pulls the container is to keep it in parity with the requirements of the discourse code.

If you want to do something like enter the container without doing a pull you can

```
 docker exec -it app bash

```

And if you wanted to add a plugin without rebuilding you could enter the plugin directory and clone it and then migrate the database, but you still need to make she your getting the right commit of the plugin for strangle) stable.

---

<div class="post-metadata">

### Author: ![Celso\_Teixeira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/celso_teixeira/32/355969_2.png) [@Celso\_Teixeira](https://meta.discourse.org/u/Celso_Teixeira)
#### Post date: [July 9, 2024, 1:51pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/8 "2024-07-09T13:51:19Z")

</div>

> [@merefield](#):
>
> ./launcher restart app

In case on adding or removing a plugin the `./launcher restart app` will not update the instance.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 9, 2024, 1:58pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/9 "2024-07-09T13:58:15Z")

</div>

Given stable releases are _relatively_ rare, they don’t present breaking changes at all often, and usually come with important security updates when there is an update, I do not understand your requirement.

To my mind adding a plugin is a _good_ excuse to update and ensure you’ve pulled all the available updates.

Not updating on stable, imho, is bad practice as that may expose you to known vulnerabilities for longer.

---

<div class="post-metadata">

### Author: ![Celso\_Teixeira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/celso_teixeira/32/355969_2.png) [@Celso\_Teixeira](https://meta.discourse.org/u/Celso_Teixeira)
#### Post date: [July 9, 2024, 2:33pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/10 "2024-07-09T14:33:42Z")

</div>

I did the following changes to the launcher

```plaintext
echo " --pull-git Pull the latest git repository"
  echo " --pull-image Pull the latest Docker image"

pull_git=false
pull_image=false
rebuild)
      if ["$(git symbolic-ref --short HEAD)" = "master"] && ["$pull_git" = true]; then
        git branch -m master main
        git fetch origin
        git branch -u origin/main main
        git remote set-head origin -a
      fi
....

```

With this I’m able to avoid to update everytime I do the rebuild. It allow the plugin to be installed.

---

<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: [July 9, 2024, 2:54pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/11 "2024-07-09T14:54:07Z")

</div>

> [@Celso\_Teixeira](#):
>
> With this I’m able to avoid to update everytime I do the rebuild. It allow the plugin to be installed.

When you have trouble with those plugins, be sure to mention this when you start a new topic.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [July 10, 2024, 12:40pm UTC](https://meta.discourse.org/t/launcher-rebuild-app-pull-the-latest-discourse-from-github/315566/12 "2024-07-10T12:40:18Z")

</div>

> [@Celso\_Teixeira](#):
>
> It allow the plugin to be installed.

No it does not, at least not properly.

It might work with API only plugins, but any javascript of new plugins needs to be compiled which happens in the build process.

Therefore, to add a new plugin you must perform a rebuild in most cases.

The other issue you have is that changing core build scripts may get you into deep trouble if you are not careful, especially if there is a significant enough change to core scripting.
