Installing to stable hash commit


(Henti Smith) #1

Good day.

I need to recreate my current production environment in a staging instance to allow testing changes before applying it to live.

My process so far is as follows.

sudo mkdir /var/discourse
sudo git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
git reset --hard docker_git_commit_hash
# Copy the exist app.yml from production. 
sudo cp /tmp/discourse-backup/app.yml containers/app.yml
# Duplicate a specific version of discourse, use the git commit hash
sudo sed -i 's/^  #version: .*$/  version: discourse_git_commit_hash/g' containers/app.yml
sudo ./launcher bootstrap app
sudo ./launcher start app

This rebuilds the correct image and setups up discourse with the correct commit version, however it’s on the beta branch, so I cannot upgrade to latest stable as I would in production.

So my options right now is either setting the version to stable, in which case it’s the incorrect version of discourse, or set the correct version of discourse, but then it’s on the incorrect branch.

How do I set the version to a specific commit, but on the stable branch ?

Regards
Henti