How to install a new plugin without updating Discourse?

I am trying to install a new plugin.

Steps I follow to install a new plugin

  1. Update the app.yml file
  2. do ./launcher rebuild app

My concern is this
When I do ./launcher rebuild app I’m sure Discourse will be updated to the latest available version and I do not want to do that. I want to stay at the currently installed discourse version.

Here is the GIT commit hash
cat /var/discourse/.git/refs/heads/master

Is this what I’m supposed to do for that

  1. Edit app.yml
  2. Find the below line of code
    ## Which Git revision should this container use? (default: tests-passed) #version: tests-passed
  3. And then make it version: 4adc37898a988bedca1f18a508da00a951826540
  4. Update the plugin repo as well in the app.yml file
  5. Save the file
  6. Do ./launcher rebuild app

If I follow the above steps, can I be sure that my discourse version won’t be updated, and that, just the plugin will be installed?


Mh, /var/discourse is a different git repo, that holds discourse_docker.

IIRC you‘ll get the git commit id from your Discourse instance in your admin dashboard with clicking on the version. Extract that from the Github URL, and you should be safe.

When I clicked on Discourse version from admin panel, it took me to below URL

From this which part should I extract?
Is it 6dad7dfcec5407d5ed1c526b6191b5c2e4153a39

Yes, that is what you would use


Thanks. :slight_smile:
And I should be using that in the below line in app.yml - correct
#version: tests-passed

Correct, your line would become

version: 6dad7dfcec5407d5ed1c526b6191b5c2e4153a39

Note how it no longer has the # at the beginning too


The URL provides what

git clone && cd discourse
git diff 6dad7dfcec5407d5ed1c526b6191b5c2e4153a39 origin/tests-passed

does. Basically a branch name also virtually points to a git commit. If you’re inside tests-passed that’s what git show HEAD gives you.

michi@mbmif /tmp/discourse (master=) $ git checkout tests-passed
Branch tests-passed set up to track remote branch tests-passed from origin.
Switched to a new branch 'tests-passed'
michi@mbmif /tmp/discourse (tests-passed=) $ git show HEAD
commit 215c0d556944f54f0c43ddf58c805901f21b584b (HEAD -> tests-passed, origin/tests-passed, origin/master, origin/HEAD, master)

As you don’t have any local discourse git checkout, you rely on the application image keeping this. And Discourse does that very well :slight_smile:

(sorry for the Git deep-dive, currently writing Git training material ;))