Can't change repo in discourse docker

You need to add a command in app.yml to change the origin remote to point to your fork, otherwise the base image will still be using the official Discourse repo. You can build your own base image, too, but that’s a lot more effort to keep maintained, and will likely cause Confusion and Delay in the future. So, just add this to your app.yml:

run:
  - exec:
     cd: /var/www/discourse
     cmd:
         - sudo -u discourse git remote set-url origin https://git.example.com/discourse.git
         - sudo -u discourse git fetch origin
         - sudo -u discourse git checkout origin/master

You can also do various other forms of the above git commands, to get the code you want checked out, checked out.

6 Likes