mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-03-14 08:48:13 -04:00
chore: redis
This commit is contained in:
parent
c15bf63f2b
commit
58ba652943
@ -146,8 +146,8 @@ class XboardInstall extends Command
|
|||||||
while (!$isReidsValid) {
|
while (!$isReidsValid) {
|
||||||
// 判断是否为Docker环境
|
// 判断是否为Docker环境
|
||||||
if ($isDocker == 'true' && ($enableRedis || confirm(label: '是否启用Docker内置的Redis', default: true, yes: '启用', no: '不启用'))) {
|
if ($isDocker == 'true' && ($enableRedis || confirm(label: '是否启用Docker内置的Redis', default: true, yes: '启用', no: '不启用'))) {
|
||||||
$envConfig['REDIS_HOST'] = 'redis';
|
$envConfig['REDIS_HOST'] = '/run/redis-socket/redis.sock';
|
||||||
$envConfig['REDIS_PORT'] = 6379;
|
$envConfig['REDIS_PORT'] = 0;
|
||||||
$envConfig['REDIS_PASSWORD'] = null;
|
$envConfig['REDIS_PASSWORD'] = null;
|
||||||
} else {
|
} else {
|
||||||
$envConfig['REDIS_HOST'] = text(label: '请输入Redis地址', default: '127.0.0.1', required: true);
|
$envConfig['REDIS_HOST'] = text(label: '请输入Redis地址', default: '127.0.0.1', required: true);
|
||||||
|
@ -3,6 +3,7 @@ services:
|
|||||||
image: ghcr.io/cedar2025/xboard:new
|
image: ghcr.io/cedar2025/xboard:new
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/www/
|
- ./:/www/
|
||||||
|
- redis-socket:/run/redis-socket
|
||||||
environment:
|
environment:
|
||||||
- docker=true
|
- docker=true
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -14,6 +15,7 @@ services:
|
|||||||
image: ghcr.io/cedar2025/xboard:new
|
image: ghcr.io/cedar2025/xboard:new
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/www/
|
- ./:/www/
|
||||||
|
- redis-socket:/run/redis-socket
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
network_mode: host
|
network_mode: host
|
||||||
command: php artisan horizon
|
command: php artisan horizon
|
||||||
@ -21,14 +23,13 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
command: redis-server --appendonly yes --appendfsync everysec
|
command: redis-server --unixsocket /run/redis-socket/redis.sock --unixsocketperm 777 --save 900 1 --save 300 10 --save 60 10000
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./.docker/.data/redis:/data
|
- ./.docker/.data/redis:/data
|
||||||
|
- redis-socket:/run/redis-socket
|
||||||
sysctls:
|
sysctls:
|
||||||
net.core.somaxconn: 1024
|
net.core.somaxconn: 1024
|
||||||
ulimits:
|
volumes:
|
||||||
nproc: 65535
|
redis-socket: # 定义共享卷用于 socket 通信
|
||||||
nofile:
|
|
||||||
soft: 20000
|
|
||||||
hard: 40000
|
|
||||||
|
Loading…
Reference in New Issue
Block a user