mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
refactor: rename ws-server command and update configuration
This commit is contained in:
@@ -65,7 +65,7 @@ priority=300
|
|||||||
|
|
||||||
[program:ws-server]
|
[program:ws-server]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
command=php /www/artisan xboard:ws-server start
|
command=php /www/artisan ws-server start
|
||||||
autostart=%(ENV_ENABLE_WS_SERVER)s
|
autostart=%(ENV_ENABLE_WS_SERVER)s
|
||||||
autorestart=true
|
autorestart=true
|
||||||
user=www
|
user=www
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ use Workerman\Worker;
|
|||||||
|
|
||||||
class NodeWebSocketServer extends Command
|
class NodeWebSocketServer extends Command
|
||||||
{
|
{
|
||||||
protected $signature = 'xboard:ws-server
|
protected $signature = 'ws-server
|
||||||
{action=start : start | stop | restart | reload | status}
|
{action=start : start | stop | restart | reload | status}
|
||||||
{--d : Start in daemon mode}
|
{--d : Start in daemon mode}
|
||||||
{--host=0.0.0.0 : Listen address}
|
{--host=0.0.0.0 : Listen address}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ services:
|
|||||||
- ./:/www/
|
- ./:/www/
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: host
|
network_mode: host
|
||||||
command: php artisan xboard:ws-server start
|
command: php artisan ws-server start
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
redis:
|
redis:
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ location ^~ / {
|
|||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
> The `/ws/` location enables WebSocket real-time node synchronization via `xboard:ws-server`. This service is enabled by default and can be toggled in Admin Panel > System Settings > Server.
|
> The `/ws/` location enables WebSocket real-time node synchronization via `ws-server`. This service is enabled by default and can be toggled in Admin Panel > System Settings > Server.
|
||||||
|
|
||||||
3. Install Xboard:
|
3. Install Xboard:
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ location ^~ / {
|
|||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
> The `/ws/` location enables real-time node synchronization via `xboard:ws-server`. This service is enabled by default and can be toggled in Admin Panel > System Settings > Server.
|
> The `/ws/` location enables real-time node synchronization via `ws-server`. This service is enabled by default and can be toggled in Admin Panel > System Settings > Server.
|
||||||
|
|
||||||
## Maintenance Guide
|
## Maintenance Guide
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ Add a WebSocket daemon process in aaPanel Supervisor:
|
|||||||
- Name: `Xboard-WS`
|
- Name: `Xboard-WS`
|
||||||
- Run User: `www`
|
- Run User: `www`
|
||||||
- Running Directory: Site directory
|
- Running Directory: Site directory
|
||||||
- Start Command: `php artisan xboard:ws-server start`
|
- Start Command: `php artisan ws-server start`
|
||||||
- Process Count: 1
|
- Process Count: 1
|
||||||
|
|
||||||
### 2. Configure Nginx
|
### 2. Configure Nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user