2024-08-15 13:58:49 +08:00
|
|
|
# surl front
|
2024-07-28 23:29:47 +08:00
|
|
|
|
2024-08-15 13:58:49 +08:00
|
|
|
短链接生成系统, 基于`Vue3`的前端
|
2024-07-28 23:29:47 +08:00
|
|
|
|
2024-08-15 13:58:49 +08:00
|
|
|
## 配置项
|
|
|
|
|
|
|
|
### 配置后端接口信息
|
|
|
|
|
|
|
|
配置`src/stores/siteconfig-store.js`中的两个变量
|
|
|
|
|
|
|
|
- `protocol` 协议,默认为`http`
|
|
|
|
- `host` 主机+端口号,默认为`localhost:18888`
|
|
|
|
|
|
|
|
## 部署
|
|
|
|
|
|
|
|
### 容器部署
|
|
|
|
|
|
|
|
1. 准备`docker`、`docker compose`环境
|
|
|
|
2. 按需修改 nginx.conf
|
|
|
|
运行 `docker compose up -d` 启动容器即可
|
|
|
|
|
|
|
|
### 本地部署
|
|
|
|
|
|
|
|
1. 安装依赖
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo apt install nodejs npm nginx
|
|
|
|
npm install
|
|
|
|
```
|
|
|
|
|
|
|
|
2. 配置nginx
|
|
|
|
|
|
|
|
- 按需修改`nginx.conf`,并复制到`/etc/nginx/sites-enabled/default`
|
|
|
|
- 运行`sudo nginx -t`检查配置
|
|
|
|
- 执行编译 `npm run build`
|
|
|
|
- 将`dist`下的内容复制到`/usr/share/nginx/html`
|
|
|
|
- 运行`sudo nginx -s reload`
|