Compare commits

..

No commits in common. "9d27e447d1ce578697116a87cae9e0716258bc8d" and "c15bf63f2be420f4c448cc7578dcacf06c3920af" have entirely different histories.

3 changed files with 17 additions and 11 deletions

View File

@ -146,8 +146,8 @@ class XboardInstall extends Command
while (!$isReidsValid) {
// 判断是否为Docker环境
if ($isDocker == 'true' && ($enableRedis || confirm(label: '是否启用Docker内置的Redis', default: true, yes: '启用', no: '不启用'))) {
$envConfig['REDIS_HOST'] = '/run/redis-socket/redis.sock';
$envConfig['REDIS_PORT'] = 0;
$envConfig['REDIS_HOST'] = 'redis';
$envConfig['REDIS_PORT'] = 6379;
$envConfig['REDIS_PASSWORD'] = null;
} else {
$envConfig['REDIS_HOST'] = text(label: '请输入Redis地址', default: '127.0.0.1', required: true);

View File

@ -3,7 +3,6 @@ services:
image: ghcr.io/cedar2025/xboard:new
volumes:
- ./:/www/
- redis-socket:/run/redis-socket
environment:
- docker=true
depends_on:
@ -15,7 +14,6 @@ services:
image: ghcr.io/cedar2025/xboard:new
volumes:
- ./:/www/
- redis-socket:/run/redis-socket
restart: on-failure
network_mode: host
command: php artisan horizon
@ -23,13 +21,14 @@ services:
- redis
redis:
image: redis:7-alpine
command: redis-server --unixsocket /run/redis-socket/redis.sock --unixsocketperm 777 --save 900 1 --save 300 10 --save 60 10000
command: redis-server --appendonly yes --appendfsync everysec
restart: unless-stopped
volumes:
- ./.docker/.data/redis:/data
- redis-socket:/run/redis-socket
sysctls:
net.core.somaxconn: 1024
volumes:
redis-socket: # 定义共享卷用于 socket 通信
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000

View File

@ -92,14 +92,21 @@ location ~ .*\.(js|css)?$
- 脚本内容:`php /www/wwwroot/站点目录/artisan schedule:run`
### 4. 开启 Octane可选
1. 添加 Octane 守护进程:
1. 配置 PHP
```bash
cp /www/server/php/81/etc/php.ini cli-php.ini
sed -i 's/^disable_functions[[:space:]]*=[[:space:]]*.*/disable_functions=header,header_remove,headers_sent,http_response_code,setcookie,session_create_id,session_id,session_name,session_save_path,session_status,session_start,session_write_close,session_regenerate_id,set_time_limit/g' cli-php.ini
```
2. 添加 Octane 守护进程:
- 名称Octane
- 运行用户www
- 运行目录:站点目录
- 启动命令:`/www/server/php/81/bin/php artisan octane:start --port 7010`
- 进程数1
2. 更新伪静态规则:
3. 更新伪静态规则:
```nginx
location ~* \.(jpg|jpeg|png|gif|js|css|svg|woff2|woff|ttf|eot|wasm|json|ico)$ {
}