翻译文档
This commit is contained in:
@@ -1,37 +1,37 @@
|
||||
# Quick Deployment Guide for 1Panel
|
||||
# 1Panel 快速部署指南
|
||||
|
||||
This guide explains how to deploy Xboard using 1Panel.
|
||||
本文档介绍如何使用 1Panel 部署 Xboard。
|
||||
|
||||
## 1. Environment Preparation
|
||||
## 1. 环境准备
|
||||
|
||||
Install 1Panel:
|
||||
安装 1Panel:
|
||||
```bash
|
||||
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && \
|
||||
sudo bash quick_start.sh
|
||||
```
|
||||
|
||||
## 2. Environment Configuration
|
||||
## 2. 环境配置
|
||||
|
||||
1. Install from App Store:
|
||||
- OpenResty (any version)
|
||||
- ⚠️ Check "External Port Access" to open firewall
|
||||
- MySQL 5.7 (Use MariaDB for ARM architecture)
|
||||
1. 从应用商店安装:
|
||||
- OpenResty(任意版本)
|
||||
- 勾选“外部端口访问”以放行防火墙
|
||||
- MySQL 5.7(ARM 架构请使用 MariaDB)
|
||||
|
||||
2. Create Database:
|
||||
- Database name: `xboard`
|
||||
- Username: `xboard`
|
||||
- Access rights: All hosts (%)
|
||||
- Save the database password for installation
|
||||
2. 创建数据库:
|
||||
- 数据库名:`xboard`
|
||||
- 用户名:`xboard`
|
||||
- 权限:所有主机(%)
|
||||
- 请保存数据库密码,安装时需要使用
|
||||
|
||||
## 3. Deployment Steps
|
||||
## 3. 部署步骤
|
||||
|
||||
1. Add Website:
|
||||
- Go to "Website" > "Create Website" > "Reverse Proxy"
|
||||
- Domain: Enter your domain
|
||||
- Code: `xboard`
|
||||
- Proxy address: `127.0.0.1:7001`
|
||||
1. 添加网站:
|
||||
- 进入“网站” > “创建网站” > “反向代理”
|
||||
- 域名:填写你的域名
|
||||
- 代号:`xboard`
|
||||
- 代理地址:`127.0.0.1:7001`
|
||||
|
||||
2. Configure Reverse Proxy:
|
||||
2. 配置反向代理:
|
||||
```nginx
|
||||
location ^~ / {
|
||||
proxy_pass http://127.0.0.1:7001;
|
||||
@@ -50,24 +50,24 @@ location ^~ / {
|
||||
}
|
||||
```
|
||||
|
||||
3. Install Xboard:
|
||||
3. 安装 Xboard:
|
||||
```bash
|
||||
# Enter site directory
|
||||
# 进入网站目录
|
||||
cd /opt/1panel/apps/openresty/openresty/www/sites/xboard/index
|
||||
|
||||
# Install Git (if not installed)
|
||||
# 安装 Git(未安装时执行)
|
||||
## Ubuntu/Debian
|
||||
apt update && apt install -y git
|
||||
## CentOS/RHEL
|
||||
yum update && yum install -y git
|
||||
|
||||
# Clone repository
|
||||
# 克隆仓库
|
||||
git clone -b compose --depth 1 https://github.com/Micah123321/Xboard ./
|
||||
|
||||
# Configure Docker Compose
|
||||
# 配置 Docker Compose
|
||||
```
|
||||
|
||||
4. Edit compose.yaml:
|
||||
4. 编辑 compose.yaml:
|
||||
```yaml
|
||||
services:
|
||||
web:
|
||||
@@ -119,60 +119,60 @@ networks:
|
||||
external: true
|
||||
```
|
||||
|
||||
5. Initialize Installation:
|
||||
5. 初始化安装:
|
||||
```bash
|
||||
# Install dependencies and initialize
|
||||
# 安装依赖并初始化
|
||||
docker compose run -it --rm web php artisan xboard:install
|
||||
```
|
||||
|
||||
⚠️ Important Configuration Notes:
|
||||
1. Database Configuration
|
||||
- Database Host: Choose based on your deployment:
|
||||
1. If database and Xboard are in the same network, use `mysql`
|
||||
2. If connection fails, go to: Database -> Select Database -> Connection Info -> Container Connection, and use the "Host" value
|
||||
3. If using external database, enter your actual database host
|
||||
- Database Port: `3306` (default port unless configured otherwise)
|
||||
- Database Name: `xboard` (the database created earlier)
|
||||
- Database User: `xboard` (the user created earlier)
|
||||
- Database Password: Enter the password saved earlier
|
||||
重要配置说明:
|
||||
1. 数据库配置
|
||||
- Database Host:按部署方式填写:
|
||||
1. 如果数据库与 Xboard 在同一网络,填写 `mysql`
|
||||
2. 如果连接失败,进入:数据库 -> 选择数据库 -> 连接信息 -> 容器连接,使用其中的 Host 值
|
||||
3. 如果使用外部数据库,填写实际数据库地址
|
||||
- Database Port:`3306`(默认端口,除非你另有配置)
|
||||
- Database Name:`xboard`(前面创建的数据库)
|
||||
- Database User:`xboard`(前面创建的用户)
|
||||
- Database Password:填写前面保存的密码
|
||||
|
||||
2. Redis Configuration
|
||||
- Choose to use built-in Redis
|
||||
- No additional configuration needed
|
||||
2. Redis 配置
|
||||
- 选择使用内置 Redis
|
||||
- 无需额外配置
|
||||
|
||||
3. Administrator Information
|
||||
- Save the admin credentials displayed after installation
|
||||
- Note down the admin panel access URL
|
||||
3. 管理员信息
|
||||
- 保存安装完成后显示的管理员账号信息
|
||||
- 记录管理后台访问地址
|
||||
|
||||
After configuration, start the services:
|
||||
配置完成后,启动服务:
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
6. Start Services:
|
||||
6. 启动服务:
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## 4. Version Update
|
||||
## 4. 版本更新
|
||||
|
||||
> 💡 Important Note: The update command varies depending on your installation version:
|
||||
> - If you installed recently (new version), use this command:
|
||||
> 重要说明:更新命令会因安装版本不同而有所区别:
|
||||
> - 如果是最近安装(新版本),使用以下命令:
|
||||
```bash
|
||||
docker compose pull && \
|
||||
docker compose run -it --rm web php artisan xboard:update && \
|
||||
docker compose up -d
|
||||
```
|
||||
> - If you installed earlier (old version), replace `web` with `xboard`:
|
||||
> - 如果是较早安装(旧版本),请把 `web` 替换为 `xboard`:
|
||||
```bash
|
||||
docker compose pull && \
|
||||
docker compose run -it --rm xboard php artisan xboard:update && \
|
||||
docker compose up -d
|
||||
```
|
||||
> 🤔 Not sure which to use? Try the new version command first, if it fails, use the old version command.
|
||||
> 不确定该用哪个命令?先尝试新版本命令,失败后再使用旧版本命令。
|
||||
|
||||
## Important Notes
|
||||
## 重要提示
|
||||
|
||||
- ⚠️ Ensure firewall is enabled to prevent port 7001 exposure to public
|
||||
- Service restart is required after code modifications
|
||||
- SSL certificate configuration is recommended for secure access
|
||||
- 请确保已开启防火墙,避免 7001 端口直接暴露到公网
|
||||
- 代码修改后需要重启服务才能生效
|
||||
- 建议配置 SSL 证书以保障访问安全
|
||||
|
||||
Reference in New Issue
Block a user