Then I forked discourse itself, add some change to test.
Went to my in instance, checked Dockerfile - it had link to my repo, installed all by instruction, build an app, enter that app and check git remote show origin - it didn’t change:
Forced to build the docker image locally, retagged as discourse/discourse and launched.
Now git repo shows the right link, but didn’t fetch my last commit from repo, looks like it cached somewhere.
I can force to fetch all commits but it’s not a solution.
Any ideas what might be a problem?
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:
Thanks Matt, that’s what I needed
But problem still remains. It has the right repo link, the repo itself cloned correctly but it has no affect, my view didn’t change. Maybe I should put this code like this:
So I added to before_code hook.
It fails on command git checkout origin/master with message:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && git pull failed with return #<Process::Status: pid 231 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"code", "cmd"=>["git reset --hard", "git clean -f", "git remote set-branches --add origin master", "git pull", "git fetch origin $version", "git checkout $version", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups"]}
9b58f831c155421a2bcf09cbed22dd61598612e737b03968fd653a4452757650
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
I’m sure that it fails on git checkout origin/master, I’ve incrementally added remote set-url, fetch origin and checkout origin/master, it fails exactly on last command. But I can’t see any clue in the error message.