discourse/docs/MIGRATION.md

60 lines
2.4 KiB
Markdown
Raw Normal View History

Deploying [Discourse on Docker][1] is currently our recommended setup. It avoids many pitfalls installations have, such as misconfigured nginx, sub-optimal Ruby defaults and so on.
2013-07-21 03:42:07 -04:00
The Docker based setup ensures we are all on the same page when diagnosing installation issues and completely eradicates a class of support calls.
2013-07-21 03:42:07 -04:00
Today, all sites hosted by Discourse are on Docker.
2013-07-21 03:42:07 -04:00
This is a basic guide on how to move your current Discourse setup to a Docker based setup.
2013-07-21 03:42:07 -04:00
## Getting started
2013-07-21 03:42:07 -04:00
First, get a blank site with working email installed. Follow the guide at https://github.com/discourse/discourse_docker and install a new, empty Discourse instance.
2013-07-21 03:42:07 -04:00
**Tips:**
2013-07-21 03:42:07 -04:00
- Bind the web to a different port than port 80, if you are on the same box. Eg:
2013-07-21 03:42:07 -04:00
expose:
- "81:80"
2013-07-21 03:42:07 -04:00
- Be sure to enter your email in the developer email section, so you get admin:
2013-07-21 03:42:07 -04:00
env:
# your email here
DISCOURSE_DEVELOPER_EMAILS: 'my_email@email.com'
2013-07-21 03:42:07 -04:00
- Make sure email is setup and working by visiting `/admin/email` and sending a test email.
2013-07-21 03:42:07 -04:00
- Make sure you have ssh access to your container `./launcher ssh my_container` must work.
2013-07-21 03:42:07 -04:00
**If any of the above is skipped your migration will fail.**
2013-07-21 03:42:07 -04:00
At the end of this process you will have a working website. Carry on.
2013-07-21 03:42:07 -04:00
## Exporting and importing the old site
2013-07-21 03:42:07 -04:00
- Ensure you are running the absolute latest version of Discourse. We had bugs in the export code in the past, make sure you are on latest before attempting an export.
- On your current instance
- go to `/admin/backups` and click on the ![Backup](https://meta-discourse.r.worldssl.net/uploads/default/3418/083f92873b96625c.png) button.
- once the backup is done, you will be able to ![Download](https://meta-discourse.r.worldssl.net/uploads/default/3420/fd77ea7e700101cd.png) it.
- On your newly installed docker instance
- enable the `allow_restore` site setting
- refresh your browser for the change to be taken into account
- go to `/admin/backups` and ![Upload](https://meta-discourse.r.worldssl.net/uploads/default/3419/21e172a1f1059364.png) your backup.
- once your upload is done, click on the ![Restore](https://meta-discourse.r.worldssl.net/uploads/default/3421/2946f976f3bea2bb.png) button
- Destroy old container `./launcher destroy web`
- Change port binding so its on 80
- Start a new container
Yay. You are done.
[1]: INSTALL-digital-ocean.md