-
Notifications
You must be signed in to change notification settings - Fork 19
Setup
Acetousk edited this page Sep 5, 2024
·
1 revision
On the server, run the following after you've run the moqui-org-compose.yml
with proper credentials and setup:
NOTE: Based on this first: https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md then this https://meta.discourse.org/t/restore-a-backup-from-the-command-line/108034
- Go to: https://forum.moqui.org/admin/backups
- Put the production database into read only mode
- Create a database backup
- Download the database backup
- Setup the DNS records to point to the new server
- Setup the ssl cert
- Go to new server.
- Ensure that the docker engine and git are installed
- Install Discourse
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers
- Move exsiting app.yml to /var/discourse/containers (See link in message or ask for example)
Note: If there is no app.yml, run in
/var/discourse
with port 80 and 443 open (you may have to stop the moqui compose file temporarily just for building)
./discourse-setup
- Configure the app.yml based on: https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247/244
- Make sure to set the VIRTUAL_HOST environment variable
- Run
/var/discourse/launcher rebuild app --docker-args '--network nginx-proxy'
- Ensure that forum.moqui.org is visible and accessible
- On the new server run:
mkdir -p /var/discourse/shared/standalone/backups/default
- Put the exact file name and file data of the just recently created database backup into the /var/discourse/shared/standalone/backups/default directory. Example:
rsync -v moqui-forum-2024-06-20-033420-v20240202052058.tar.gz [email protected]:/var/discourse/shared/standalone/backups/default
- Restore the Backup on the new server
# Access your destination server and go to the Discourse folder
cd /var/discourse
# Enter the Discourse Docker app container
./launcher enter app
# From inside the Docker container, enable restores via
discourse enable_restore
# Restore the backup file
discourse restore moqui-forum-2024-06-20-033420-v20240202052058.tar.gz
- Exit by running:
# Exit the Discourse Docker app container
exit
- Rebuild
cd /var/discourse
./launcher rebuild app --docker-args '--network nginx-proxy'
- Ensure that forum.moqui.org points to the new server, has the correct data, and you are able to login
- Cleanup the old instance