feat: 新增 Docker 部署支持、Swoole/Octane 集成及相关优化
- 添加 Dockerfile 与多套 docker-compose 配置(开发/生产环境) - 集成 Laravel Octane (Swoole) 提升性能 - 新增健康检查、监控脚本及部署文档 - 新增 Docker 镜像离线导入包(MySQL/Redis/Meilisearch) - 优化文档转换、预览服务及队列任务 - 添加 CreateAdminUser 命令与路由健康检查接口 - 新增 Swoole 队列兼容性测试套件 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
45
docker/supervisor/supervisord.conf
Normal file
45
docker/supervisor/supervisord.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
# Supervisor配置文件 - Swoole版本
|
||||
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
childlogdir=/var/log/supervisor/
|
||||
|
||||
[unix_http_server]
|
||||
file=/var/run/supervisor.sock
|
||||
chmod=0700
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
# Swoole HTTP服务器 (Laravel Octane)
|
||||
[program:swoole]
|
||||
command=php /var/www/html/artisan octane:start --host=0.0.0.0 --port=8000 --workers=4
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=5
|
||||
numprocs=1
|
||||
startsecs=0
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
|
||||
stderr_logfile_maxbytes=10MB
|
||||
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
|
||||
stdout_logfile_maxbytes=10MB
|
||||
user=www-data
|
||||
|
||||
# Laravel队列处理器
|
||||
[program:laravel-worker]
|
||||
command=php /var/www/html/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=5
|
||||
numprocs=1
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/var/log/supervisor/laravel-worker.log
|
||||
stopwaitsecs=3600
|
||||
user=www-data
|
||||
Reference in New Issue
Block a user