Edit in Sep. 2017:
I wrote this “guide” in May 2015. I do not use Discourse any more (stopped soon after). I do not know if any of these instructions still work or how things are done nowadays.
I managed to migrate to two containers. If anyone else needs instructions, this is how it worked for me.
The process includes backup, setting up separate web and data containers and restore data.
Stop current standalone container
./launcher stop app
containers/rename them to whatever you’d like
if you rename them, please pay attention to the entries
If you renamed
web_rocks.ymlyou need to modify the entry like this:
volumes: - volume: host: /var/discourse/shared/web_rocks guest: /shared - volume: host: /var/discourse/shared/web_rocks/log/var-log guest: /var/log
Do this in
Setting up data container
data.yml and set a password for the database. Then:
./launcher bootstrap data(or whatever you renamed data to)
- if everything goes smoothly you can connect to the container via:
./launcher enter data(again: replace data with your name)
- Exit the container by
Setting up web container
Firstly, change the template and expose ports as your
Secondly, make sure you are linking to the right data container. If you renamed the data.yml to ‘something_else’ put it in for ‘name’.
# Use 'links' key to link containers together, aka use Docker --link flag. links: - link: name: data alias: data
Although we don’t want to expose ssh or any other ports anymore, you’d still need to expose 80 and 443 port for web access. This depends on whether you have a nginx running in the front and how you connect container with it.
Somewhere in there you’ll find this block:
DISCOURSE_DB_USERNAME: discourse DISCOURSE_DB_PASSWORD: mypassword DISCOURSE_DB_HOST: data DISCOURSE_REDIS_HOST: data
- Enter the password you set inside the data container.
- Enter the data container’s alias you just wrote down. For
REDIS_HOST. It has to match the links block we mentioned.
- You probably didn’t change the
You’ll find the values for
DISCOURSE_HOSTNAME and many more. You already have these values in your
app.yml. Copy them from there.
In the hooks section remember to set any additional plugins you already use inside app.yml
Now you should be ready to bootstrap it:
./launcher bootstrap web_only (again with your name)
When Discourse is ready, login and restore your site.
After this, everything worked again for me and my discourse installation was running again, but now in two separate containers.