From adb5b48d565405eeaa6e5f8543d421faf5481340 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:41:08 +0100 Subject: [PATCH 01/10] add english readme --- READMEen.md | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 READMEen.md diff --git a/READMEen.md b/READMEen.md new file mode 100644 index 0000000..4bb7bdc --- /dev/null +++ b/READMEen.md @@ -0,0 +1,94 @@ +## Docker-Compose Deployment Guide + +This guide teaches you how to quickly deploy **Xboard** using `docker-compose` and SQLite via the command line. +If you wish to use MySQL, you must handle its installation separately. + +### Deployment (Deploy in 2 Minutes with Docker-Compose) + +> Steps to install and quickly experience Xboard. +Deploy your site rapidly using **docker-compose + SQLite** (no need to install MySQL or Redis). + +#### 1. Install Docker +```bash +curl -sSL https://get.docker.com | bash +``` +For CentOS systems, you may need to execute the following commands to start Docker: +```bash +systemctl enable docker +systemctl start docker +``` + +#### 2. Retrieve the Docker Compose File +```bash +git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard +cd Xboard +``` + +#### 3. Execute the Database Installation Command +> Choose **Enable SQLite** and **Docker-Built Redis** +```bash +docker compose run -it --rm -e enable_sqlite=true -e enable_redis=true -e admin_account=your_admin_email@example.com xboard php artisan xboard:install +``` +> Or customize your options at runtime: +```bash +docker compose run -it --rm xboard php artisan xboard:install +``` +> After running the above command, your admin panel address, admin account, and password will be returned (make sure to note these down). +> You need to complete the next step, **Start Xboard**, before accessing the admin panel. + +#### 4. Start Xboard +```bash +docker compose up -d +``` +> Once installation is complete, you can access your site. + +#### 5. Access the Site +> After startup, the website port defaults to `7001`. You can configure an NGINX reverse proxy to use port `80`. + +Website URL: +http://your-IP:7001/ + +Congratulations, you’ve successfully deployed Xboard! You can now visit the site and experience all of Xboard’s features. + +> If you need to use MySQL, please install MySQL separately and redeploy. + +--- + +### **Updating Xboard** +#### 1. Modify the Version +```bash +cd Xboard +vi docker-compose.yaml +``` +> Edit the `docker-compose.yaml` file and update the version number following `image` to your desired version. +> If the version is `latest`, you can skip this step and proceed to step 2. + +#### 2. Update the Database (Safe to run multiple times) +```bash +docker compose pull +docker compose down +docker compose run -it --rm xboard php artisan xboard:update +docker compose up -d +``` +> The update is now complete. + +--- + +### **Rollback** +> Note: This rollback does not revert the database. Refer to relevant documentation for database rollbacks. + +#### 1. Revert the Version +```bash +vi docker-compose.yaml +``` +> Edit the `docker-compose.yaml` file and change the version number following `image` to the previous version. + +#### 2. Start the Service +```bash +docker compose up -d +``` + +--- + +### Note +Any code changes made after enabling **webman** require a restart to take effect. From 0985ca0e492624e70eb9d8398e4b6f1886db66e4 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:42:45 +0100 Subject: [PATCH 02/10] add english mode --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 740050d..527ae99 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +Chinese l [English](/READMEen.md) # 关于Xboard Xboard是基于V2board二次开发,在性能上和功能上都有大部分增强的**面板 From 1d99d81d69a7ec4cdd712c7304ae7f113e4ff7e6 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:43:37 +0100 Subject: [PATCH 03/10] add chinese button to return to normal "README.md" --- READMEen.md | 1 + 1 file changed, 1 insertion(+) diff --git a/READMEen.md b/READMEen.md index 4bb7bdc..8f8c99a 100644 --- a/READMEen.md +++ b/READMEen.md @@ -1,3 +1,4 @@ +English l [Chinese](/README.md) ## Docker-Compose Deployment Guide This guide teaches you how to quickly deploy **Xboard** using `docker-compose` and SQLite via the command line. From 21738dd17fef3fa73de932f022764bc18e07315a Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:48:28 +0100 Subject: [PATCH 04/10] add english to the bottom --- docs/性能对比.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/docs/性能对比.md b/docs/性能对比.md index f90f44b..478f404 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -1,4 +1,3 @@ - # 性能对比总结 ## 测试使用机器配置 @@ -24,4 +23,34 @@ CPU核心数量: 4核 |场景 | php-fpm | php-fpm(开启opcache)|laravels | webman(docker)| |---- | ---- |---- |--- |---- | | 登录页面 | FCP(7秒/2.9秒) | FCP (7秒/2.9秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | -| 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | \ No newline at end of file +| 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | + +# Performance Comparison Summary + +## Test Machine Configuration +- **CPU Model**: Intel 8255C +- **CPU Cores**: 4 cores +- **Memory**: 8 GB + +--- + +## Concurrent Performance Comparison Across Environments +> **php-fpm** refers to the typical installation method via aapanel (or BT panel). Concurrent testing was conducted using `wrk`. + +| Scenario | php-fpm (Traditional) | php-fpm (Traditional with OPCache) | Laravels | Webman (Docker) | +|---------------|------------------------|------------------------------------|----------|-----------------| +| Homepage | 6 req/s | 157 req/s | 477 req/s| 803 req/s | +| User Subscription | 6 req/s | 196 req/s | 586 req/s| 1064 req/s | +| User Homepage Latency | 308 ms | 110 ms | 101 ms | 98 ms | + +--- + +## Frontend Load Speed Comparison (v2b Original/Xboard) +> **FCP (First Contentful Paint)** measures the time taken to render the first visible content. Lower values are better. + +> **FCP (Original Time / Xboard Time)** + +| Scenario | php-fpm | php-fpm (with OPCache) | Laravels | Webman (Docker) | +|--------------|-----------------------------|---------------------------------|--------------------|-----------------------| +| Login Page | FCP (7s / 2.9s) | FCP (7s / 2.9s) | FCP (7.1s / 2.7s) | FCP (7.3s / 2.9s) | +| Registration Page | FCP (7.1s / 3s) | FCP (7s / 2.8s) | FCP (7.1s / 2.7s) | FCP (7.3s / 2.9s) | From 3b201b578322949500444798ad55865ffa8bcf49 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:49:10 +0100 Subject: [PATCH 05/10] =?UTF-8?q?Update=20=E6=80=A7=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=AF=94.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/性能对比.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/性能对比.md b/docs/性能对比.md index 478f404..c7a3122 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -25,6 +25,7 @@ CPU核心数量: 4核 | 登录页面 | FCP(7秒/2.9秒) | FCP (7秒/2.9秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | | 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | +English --------- # Performance Comparison Summary ## Test Machine Configuration From a66642acae61cb50e57b2e0703c7c6f5741bd622 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:49:42 +0100 Subject: [PATCH 06/10] =?UTF-8?q?Update=20=E6=80=A7=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=AF=94.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/性能对比.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/性能对比.md b/docs/性能对比.md index c7a3122..2adba0c 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -25,7 +25,7 @@ CPU核心数量: 4核 | 登录页面 | FCP(7秒/2.9秒) | FCP (7秒/2.9秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | | 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | -English --------- + ##--------- English --------- # Performance Comparison Summary ## Test Machine Configuration From 37e51f9ebfeac39ab0d4c0a17dd5268ba2013776 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:50:17 +0100 Subject: [PATCH 07/10] =?UTF-8?q?Update=20=E6=80=A7=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=AF=94.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/性能对比.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/性能对比.md b/docs/性能对比.md index 2adba0c..6b3f685 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -25,7 +25,8 @@ CPU核心数量: 4核 | 登录页面 | FCP(7秒/2.9秒) | FCP (7秒/2.9秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | | 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | - ##--------- English --------- + ## English + # Performance Comparison Summary ## Test Machine Configuration From 2a360c5ed50fe93f0540f370ddbc1408af4951ec Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:50:37 +0100 Subject: [PATCH 08/10] =?UTF-8?q?Update=20=E6=80=A7=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=AF=94.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/性能对比.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/性能对比.md b/docs/性能对比.md index 6b3f685..7bf1b41 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -25,8 +25,9 @@ CPU核心数量: 4核 | 登录页面 | FCP(7秒/2.9秒) | FCP (7秒/2.9秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | | 注册页面 | FCP(7.1秒/3秒) | FCP (7秒/2.8秒) | FCP(7.1秒/2.7秒) | FCP(7.3秒/2.9秒) | - ## English - + + +#English # Performance Comparison Summary ## Test Machine Configuration From e8d4603eed633d2f73facc41ca092fcadec224cd Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:51:22 +0100 Subject: [PATCH 09/10] =?UTF-8?q?Update=20=E6=80=A7=E8=83=BD=E5=AF=B9?= =?UTF-8?q?=E6=AF=94.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/性能对比.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/性能对比.md b/docs/性能对比.md index 7bf1b41..5bbd517 100644 --- a/docs/性能对比.md +++ b/docs/性能对比.md @@ -27,7 +27,7 @@ CPU核心数量: 4核 -#English +# -------- English -------- # Performance Comparison Summary ## Test Machine Configuration From 0393a918201d39e66afea7ec090cdf01958e34a1 Mon Sep 17 00:00:00 2001 From: Tamino <36358673+PalmTamino@users.noreply.github.com> Date: Sun, 12 Jan 2025 18:52:36 +0100 Subject: [PATCH 10/10] =?UTF-8?q?Update=20docker-compose=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=8C=87=E5=8D=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docker-compose安装指南.md | 97 ++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/docs/docker-compose安装指南.md b/docs/docker-compose安装指南.md index ac25f8b..7a9ac67 100644 --- a/docs/docker-compose安装指南.md +++ b/docs/docker-compose安装指南.md @@ -72,6 +72,103 @@ vi docker-compose.yaml ``` docker compose up -d ``` +# English +## Docker-Compose Deployment Guide + +This article guides you on how to quickly deploy **Xboard** using `docker-compose` and SQLite via the command line. +If you prefer using MySQL, you will need to handle the MySQL installation separately. + +--- + +### Deployment (2-Minute Deployment with Docker-Compose) + +> Here are the steps to install and quickly experience Xboard. +Deploy your site efficiently using **docker-compose + SQLite** (no need to install MySQL or Redis). + +#### 1. Install Docker +```bash +curl -sSL https://get.docker.com | bash +``` +For CentOS systems, you may need to execute the following commands to start Docker: +```bash +systemctl enable docker +systemctl start docker +``` + +#### 2. Download the Docker Compose Files +```bash +git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard +cd Xboard +``` + +#### 3. Run the Database Installation Command +> Enable **SQLite** and **Redis (Docker-Built)**: +```bash +docker compose run -it --rm -e enable_sqlite=true -e enable_redis=true -e admin_account=your_admin_email@example.com xboard php artisan xboard:install +``` +Alternatively, customize your preferences at runtime: +```bash +docker compose run -it --rm xboard php artisan xboard:install +``` +> After running this command, it will return your admin panel URL, admin account, and password (make sure to record these). +> You need to complete the next step, **Start Xboard**, to access the admin panel. + +#### 4. Start Xboard +```bash +docker compose up -d +``` +> After installation, your site will be ready for access. + +#### 5. Access Your Site +> By default, the website runs on port `7001`. You can configure an NGINX reverse proxy to use port `80`. + +Website URL: +`http://your-IP:7001/` + +Congratulations! You’ve successfully deployed Xboard. You can now visit the URL to explore its full functionality. + +> If you need MySQL, please install it separately and redeploy. + +--- + +### **Updating Xboard** +#### 1. Modify the Version +```bash +cd Xboard +vi docker-compose.yaml +``` +> Update the version number following `image` in the `docker-compose.yaml` file to your desired version. +> If the version is set to `latest`, you can skip this step and proceed to step 2. + +#### 2. Update the Database (Safe to Execute Multiple Times) +```bash +docker compose pull +docker compose down +docker compose run -it --rm xboard php artisan xboard:update +docker compose up -d +``` +> The update is now complete. + +--- + +### **Rollback** +> Note: This rollback does not revert the database. Please refer to relevant documentation if a database rollback is required. + +#### 1. Revert to a Previous Version +```bash +vi docker-compose.yaml +``` +> Update the version number following `image` in the `docker-compose.yaml` file to the previous version. + +#### 2. Start the Service +```bash +docker compose up -d +``` + +--- + +### Note +Any code modifications made after enabling **webman** require a restart to take effect. ### 注意 启用webman后做的任何代码修改都需要重启生效