Skip to content

Commit c6169e9

Browse files
committed
fix:添加额外的部署说明
1 parent ccd9ac6 commit c6169e9

2 files changed

Lines changed: 133 additions & 43 deletions

File tree

docs/en/guide/oneclickvirt/oneclickvirt_install.md

Lines changed: 69 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,22 @@ Since the database starts together when starting, do not operate immediately whe
3636

3737
#### Method 1: Using Pre-built Images
3838

39-
**Setup in Fresh Environment**
39+
**Image Tag Description**
4040

41-
Use pre-built ```amd64``` or ```arm64``` images, which will automatically download the corresponding version based on the current system architecture:
41+
| Image Tag | Description | Use Case |
42+
|---------|------|---------|
43+
| `spiritlhl/oneclickvirt:latest` | Integrated version (built-in database) latest | Quick deployment |
44+
| `spiritlhl/oneclickvirt:20251015` | Integrated version specific date version | Need fixed version |
45+
| `spiritlhl/oneclickvirt:no-db` | Independent database version latest | Without built-in database |
46+
| `spiritlhl/oneclickvirt:no-db-20251015` | Independent database version specific date | Without built-in database |
47+
48+
All images support `linux/amd64` and `linux/arm64` architectures.
49+
50+
**Deployment in Fresh Environment**
51+
52+
Using pre-built `amd64` or `arm64` images, will automatically download the corresponding version based on current system architecture:
53+
54+
Without domain configuration:
4255

4356
```bash
4457
docker run -d \
@@ -50,73 +63,105 @@ docker run -d \
5063
spiritlhl/oneclickvirt:latest
5164
```
5265

53-
Or use GitHub Container Registry:
66+
With domain access configuration:
67+
68+
If you need to configure a domain, you need to set the `FRONTEND_URL` environment variable:
5469

5570
```bash
5671
docker run -d \
5772
--name oneclickvirt \
5873
-p 80:80 \
74+
-e FRONTEND_URL="https://your-domain.com" \
5975
-v oneclickvirt-data:/var/lib/mysql \
6076
-v oneclickvirt-storage:/app/storage \
6177
--restart unless-stopped \
62-
ghcr.io/oneclickvirt/oneclickvirt:latest
78+
spiritlhl/oneclickvirt:latest
6379
```
6480

65-
The above methods are only for new installations.
81+
The above methods are only for fresh installation
6682

67-
**Setup in Existing Environment**
83+
**Upgrade Frontend and Backend Only in Existing Environment**
6884

69-
If you are installing again after deleting the container, you need to ensure that the originally mounted data is also deleted, so that the database will be reinitialized when the container is rebuilt.
85+
No need to delete mounted volumes, just delete the container itself
7086

7187
```shell
7288
docker rm -f oneclickvirt
73-
docker volume rm oneclickvirt-data oneclickvirt-storage
7489
```
7590

76-
Then follow the steps for fresh environment setup.
77-
78-
**Delete Container Image**
91+
Then delete the original image
7992

8093
```shell
8194
docker image rm -f spiritlhl/oneclickvirt:latest
82-
docker image rm -f ghcr.io/oneclickvirt/oneclickvirt:latest
8395
```
8496

85-
Only by deleting the container image and re-pulling the image can you ensure that the image used is the latest one; otherwise, the image will not be automatically updated.
86-
87-
**Re-pull Container Image**
97+
Pull the container image again
8898

8999
```shell
90100
docker pull spiritlhl/oneclickvirt:latest
91101
```
92102

93-
or
103+
Then follow the steps for deployment in fresh environment, note that after waiting 12 seconds to open the frontend, you will find it automatically skips the initialization interface because the data has been saved and is available
104+
105+
**Redeploy in Existing Environment**
106+
107+
Need to delete not only the container but also the corresponding mounts:
94108

95109
```shell
96-
docker pull ghcr.io/oneclickvirt/oneclickvirt:latest
110+
docker rm -f oneclickvirt
111+
docker volume rm oneclickvirt-data oneclickvirt-storage
97112
```
98113

99-
#### Method 2: Self-compile and Package
114+
Then delete the original image
115+
116+
```shell
117+
docker image rm -f spiritlhl/oneclickvirt:latest
118+
```
100119

101-
If you need to modify the source code or customize the build:
120+
Pull the container image again
102121

103-
```bash
104-
git clone https://github.com/oneclickvirt/oneclickvirt.git
105-
cd oneclickvirt
122+
```shell
123+
docker pull spiritlhl/oneclickvirt:latest
106124
```
107125

126+
Then follow the steps for deployment in fresh environment, this will prompt for reinitialization, all original data has been deleted.
127+
128+
#### Method 2: Build and Package Yourself
129+
130+
If you need to modify source code or custom build:
131+
132+
**Integrated version (built-in database)**
133+
108134
```bash
135+
git clone https://github.com/oneclickvirt/oneclickvirt.git
136+
cd oneclickvirt
109137
docker build -t oneclickvirt .
138+
docker run -d \
139+
--name oneclickvirt \
140+
-p 80:80 \
141+
-v oneclickvirt-data:/var/lib/mysql \
142+
-v oneclickvirt-storage:/app/storage \
143+
--restart unless-stopped \
144+
oneclickvirt
110145
```
111146

147+
**Independent database version:**
148+
112149
```bash
150+
git clone https://github.com/oneclickvirt/oneclickvirt.git
151+
cd oneclickvirt
152+
docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
113153
docker run -d \
114154
--name oneclickvirt \
115155
-p 80:80 \
116-
-v oneclickvirt-data:/var/lib/mysql \
156+
-e FRONTEND_URL="https://your-domain.com" \
157+
-e DB_HOST="your-mysql-host" \
158+
-e DB_PORT="3306" \
159+
-e DB_NAME="oneclickvirt" \
160+
-e DB_USER="root" \
161+
-e DB_PASSWORD="your-password" \
117162
-v oneclickvirt-storage:/app/storage \
118163
--restart unless-stopped \
119-
oneclickvirt
164+
oneclickvirt:no-db
120165
```
121166

122167
### Installation via Pre-compiled Binary Files

docs/guide/oneclickvirt/oneclickvirt_install.md

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,23 @@ API 文档:```http://localhost:8888/swagger/index.html```
3838

3939
#### 方式一:使用预构建镜像
4040

41+
**镜像标签说明**
42+
43+
| 镜像标签 | 说明 | 适用场景 |
44+
|---------|------|---------|
45+
| `spiritlhl/oneclickvirt:latest` | 一体化版本(内置数据库)最新版 | 快速部署 |
46+
| `spiritlhl/oneclickvirt:20251015` | 一体化版本特定日期版本 | 需要固定版本 |
47+
| `spiritlhl/oneclickvirt:no-db` | 独立数据库版本最新版 | 不内置数据库 |
48+
| `spiritlhl/oneclickvirt:no-db-20251015` | 独立数据库版本特定日期 | 不内置数据库 |
49+
50+
所有镜像均支持 `linux/amd64``linux/arm64` 架构。
51+
4152
**全新环境下开设**
4253

4354
使用已构建好的```amd64``````arm64```镜像,会自动根据当前系统架构下载对应版本:
4455

56+
不配置域名:
57+
4558
```bash
4659
docker run -d \
4760
--name oneclickvirt \
@@ -52,73 +65,105 @@ docker run -d \
5265
spiritlhl/oneclickvirt:latest
5366
```
5467

55-
或者使用 GitHub Container Registry:
68+
配置域名访问:
69+
70+
如果你需要配置域名,需要设置 `FRONTEND_URL` 环境变量:
5671

5772
```bash
5873
docker run -d \
5974
--name oneclickvirt \
6075
-p 80:80 \
76+
-e FRONTEND_URL="https://your-domain.com" \
6177
-v oneclickvirt-data:/var/lib/mysql \
6278
-v oneclickvirt-storage:/app/storage \
6379
--restart unless-stopped \
64-
ghcr.io/oneclickvirt/oneclickvirt:latest
80+
spiritlhl/oneclickvirt:latest
6581
```
6682

6783
以上的方式仅限于新安装
6884

69-
**旧有环境下开设**
85+
**旧有环境下仅升级前后端**
7086

71-
如果是删除了容器再次进行安装,那么需要确保原挂载的数据也进行删除,这样后续重建容器才会数据库重新初始化。
87+
不需要删除挂载盘仅删除容器本身即可
7288

7389
```shell
7490
docker rm -f oneclickvirt
75-
docker volume rm oneclickvirt-data oneclickvirt-storage
7691
```
7792

78-
然后再按全新环境下开设的步骤来
79-
80-
**删除容器镜像**
93+
然后删除原始的镜像
8194

8295
```shell
8396
docker image rm -f spiritlhl/oneclickvirt:latest
84-
docker image rm -f ghcr.io/oneclickvirt/oneclickvirt:latest
8597
```
8698

87-
删除了容器镜像重新拉取镜像,才能确保镜像使用的是最新的镜像,否则不会自动更新镜像。
88-
89-
**重新拉取容器镜像**
99+
重新拉取容器镜像
90100

91101
```shell
92102
docker pull spiritlhl/oneclickvirt:latest
93103
```
94104

95-
105+
然后再按全新环境下开设的步骤来,注意等待12秒后打开前端,会发现已自动越过初始化界面,因为数据已保存可用
106+
107+
**旧有环境下重新开设**
108+
109+
不仅需要删除容器还得删除对应的挂载:
110+
111+
```shell
112+
docker rm -f oneclickvirt
113+
docker volume rm oneclickvirt-data oneclickvirt-storage
114+
```
115+
116+
然后删除原始的镜像
117+
118+
```shell
119+
docker image rm -f spiritlhl/oneclickvirt:latest
120+
```
121+
122+
重新拉取容器镜像
96123

97124
```shell
98-
docker pull ghcr.io/oneclickvirt/oneclickvirt:latest
125+
docker pull spiritlhl/oneclickvirt:latest
99126
```
100127

128+
然后再按全新环境下开设的步骤来,这样会提示重新初始化,所有原始数据已删除。
129+
101130
#### 方式二:自己编译打包
102131

103132
如果需要修改源码或自定义构建:
104133

134+
**一体化版本(内置数据库)**
135+
105136
```bash
106137
git clone https://github.com/oneclickvirt/oneclickvirt.git
107138
cd oneclickvirt
108-
```
109-
110-
```bash
111139
docker build -t oneclickvirt .
140+
docker run -d \
141+
--name oneclickvirt \
142+
-p 80:80 \
143+
-v oneclickvirt-data:/var/lib/mysql \
144+
-v oneclickvirt-storage:/app/storage \
145+
--restart unless-stopped \
146+
oneclickvirt
112147
```
113148

149+
**独立数据库版本:**
150+
114151
```bash
152+
git clone https://github.com/oneclickvirt/oneclickvirt.git
153+
cd oneclickvirt
154+
docker build -f Dockerfile.no-db -t oneclickvirt:no-db .
115155
docker run -d \
116156
--name oneclickvirt \
117157
-p 80:80 \
118-
-v oneclickvirt-data:/var/lib/mysql \
158+
-e FRONTEND_URL="https://your-domain.com" \
159+
-e DB_HOST="your-mysql-host" \
160+
-e DB_PORT="3306" \
161+
-e DB_NAME="oneclickvirt" \
162+
-e DB_USER="root" \
163+
-e DB_PASSWORD="your-password" \
119164
-v oneclickvirt-storage:/app/storage \
120165
--restart unless-stopped \
121-
oneclickvirt
166+
oneclickvirt:no-db
122167
```
123168

124169
### 通过预编译二进制文件安装

0 commit comments

Comments
 (0)