You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/docs/en/deployment/upgrade-guide.md
+58-42Lines changed: 58 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,62 @@
2
2
3
3
## 🚀 Upgrade Overview
4
4
5
-
Follow these four steps to upgrade Nexent safely:
5
+
Follow these steps to upgrade Nexent safely:
6
6
7
-
1. Clean up existing containers and images
8
-
2. Pull the latest code and run the deployment script
9
-
3. Apply database migrations
10
-
4. Verify the deployment in your browser
7
+
1. Pull the latest code
8
+
2. Execute the upgrade script
9
+
3. Open the site to confirm service availability
11
10
12
11
---
13
12
14
-
## 🧹 Step 1: Clean up old images
13
+
## 🔄 Step 1: Update Code
15
14
16
-
Remove cached resources to avoid conflicts when redeploying:
15
+
Before updating, record the current deployment version and data directory information.
16
+
17
+
- Current Deployment Version Location: APP_VERSION in backend/consts/const.py
18
+
- Data Directory Location: ROOT_DIR in docker/.env
19
+
20
+
**Code downloaded via git**
21
+
22
+
Update the code using git commands:
23
+
24
+
```bash
25
+
git pull
26
+
```
27
+
28
+
**Code downloaded via ZIP package or other means**
29
+
30
+
1. Re-download the latest code from GitHub and extract it.
31
+
2. If it exists, copy the deploy.options file from the docker directory of your previous deployment script directory to the docker directory of the new code directory. (If the file doesn't exist, you can ignore this step).
32
+
33
+
## 🔄 Step 2: Execute the Upgrade
34
+
35
+
Navigate to the docker directory of the updated code and run the upgrade script:
36
+
37
+
```bash
38
+
bash upgrade.sh
39
+
```
40
+
41
+
If deploy.options is missing, the script will prompt you to manually enter configuration details from the previous deployment, such as the current version and data directory. Enter the information you recorded earlier.
42
+
43
+
>💡 Tip
44
+
> The default scenario is quick deployment, which uses .env.example.
45
+
> If you need to configure voice models (STT/TTS), please add the relevant variables to .env.example in advance. We will provide a front-end configuration interface as soon as possible.
46
+
47
+
48
+
## 🌐 Step 3: Verify the deployment
49
+
50
+
After deployment:
51
+
52
+
1. Open `http://localhost:3000` in your browser.
53
+
2. Review the [User Guide](https://doc.nexent.tech/en/user-guide/home-page) to validate agent functionality.
54
+
55
+
56
+
## Optional Operations
57
+
58
+
### 🧹 Clean Up Old Version Images
59
+
60
+
If images were not updated correctly, you can clean up old containers and images before upgrading:
17
61
18
62
```bash
19
63
# Stop and remove existing containers
@@ -38,24 +82,9 @@ docker system prune -af
38
82
39
83
---
40
84
41
-
## 🔄 Step 2: Update code and redeploy
42
-
43
-
```bash
44
-
git pull
45
-
cd nexent/docker
46
-
cp .env.example .env
47
-
bash deploy.sh
48
-
```
49
-
50
-
> 💡 Tip
51
-
> - `.env.example` works for default deployments.
52
-
> - Configure speech models (STT/TTS) in`.env` when needed. A frontend configuration flow is coming soon.
53
-
54
-
---
55
-
56
-
## 🗄️ Step 3: Apply database migrations
85
+
## 🗄️ Manual Database Update
57
86
58
-
Run the SQL scripts shipped with each release to keep your schema up to date.
87
+
If some SQL files fail to execute during the upgrade, you can perform the update manually.
59
88
60
89
### ✅ Method A: Use a SQL editor (recommended)
61
90
@@ -68,8 +97,8 @@ Run the SQL scripts shipped with each release to keep your schema up to date.
68
97
- Password
69
98
3. Test the connection. When successful, you should see tables under the `nexent` schema.
70
99
4. Open a new query window.
71
-
5. Navigate to `/nexent/docker/sql`. Each file contains one migration script with its release date inthe filename.
72
-
6. Execute every script dated after your previous deployment, in chronological order.
100
+
5. Navigate to the /nexent/docker/sql directory and open the failed SQL file(s) to view the script.
101
+
6. Execute the failed SQL file(s) and any subsequent version SQL files in order.
73
102
74
103
> ⚠️ Important
75
104
> - Always back up the database first, especially in production.
@@ -97,14 +126,12 @@ Run the SQL scripts shipped with each release to keep your schema up to date.
0 commit comments