Launcher rebuild app pull the latest discourse from github

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?

are you concerned about version stability?

why don’t you just switch to stable branch?

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.

Are you using a standard install?

If so why just not run the rebuild command?

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

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.

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.

1 Like

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.

2 Likes

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

1 Like

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.

1 Like

I did the following changes to the launcher

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.

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

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.

1 Like