- Copy the appdata folder in ~ directory and store it locally for future use. (Contains all media files and swag config)
- Change domain DNS records to point to new URL.
- Add the new server IP address to MongoDB network tab
- Install
dockerandgitin the server if not previously existing. git clone <repository url>cd /website/backendtouch .env && nano .envand add all secrets to it- If an existing
appdatafolder does not exist (from the old server)sudo docker compose up -dsudo docker ps -asudo docker exec -it <swag container id> bashcd config/nginx/proxy-confstouch cms.subdomain.conf && nano cms.subdomain.conf- Copy contents of
nginx.confto the created file - Save and exit the container -
exit sudo docker restart <swag container id>- restart the swag container
- Else
- Copy
appdatafolder to~ sudo docker compose up -d
- Copy
- Server should hopefully be alright and the CMS should work now.
- Can add Prometheus and Grafana to log and monitor the server
- Can possibly move MongoDB to the server so as to avoid the headache of configuring the IP.