Skip to content

Commit 2e8213e

Browse files
committed
feat: added update webui guide
1 parent 24a233e commit 2e8213e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pages/docs/webui/update.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: 'docs'
3+
title: 'Update'
4+
navTitle: 'Update'
5+
category: 'Web UI'
6+
description: 'Update the BanManager WebUI to the latest version'
7+
---
8+
Learn how to upgrade the BanManager WebUI with just a couple of steps.
9+
10+
---
11+
12+
## First, make a full backup
13+
Whenever doing an update it’s a good idea to take a full backup of your site first. If anything goes wrong, you’ll still have all your data.
14+
15+
## Update to the latest version
16+
This guide assumes your BanManager-WebUI installation is located in `/home/banmanager/BanManager-WebUI`, please replace where applicable.
17+
18+
Run the following commands in order:
19+
20+
1. `cd /home/banmanager/BanManager-WebUI`
21+
1. `git rev-parse HEAD` to make a note of your current version (in case you need to rollback)
22+
1. `git pull` to fetch the latest version
23+
1. `npm ci --production` to install the latest dependencies
24+
1. `npm run heroku-postbuild` to build the latest pages and run database migrations
25+
1. Restart the process - dependant on your setup
26+
27+
## Troubleshooting any problems
28+
If something goes wrong, you can always revert to the previous version.
29+
30+
1. `node bin/run undo` to revert database migration changes
31+
1. `git checkout <commit>` to checkout the source of a previous version, replace `<commit>` with the short hash noted from `git rev-parse HEAD` command prior to updating, e.g. `git checkout 56fe206`
32+
1. `npm ci --production` to install the old dependencies
33+
1. `npm run build` to build the old pages
34+
1. Restart the process - dependant on your setup
35+
36+
If you’re still having trouble, start by searching the [BanManager Discord](https://discord.gg/59bsgZB) to see if your issue has come up before.

0 commit comments

Comments
 (0)