gpt4 book ai didi

linux - 无法使用主管启动 laravel-echo-server

转载 作者:太空宇宙 更新时间:2023-11-04 12:13:01 24 4
gpt4 key购买 nike

我的项目位于/var/www/html/bcbAPIlaravel-echo-server.json 文件位于 usr/bin

我的 laravel-worker.conf 文件

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/bcbAPI/artisan queue:work --queue="emails, queue, queue2" --tries=1 --daemon
autostart=true
autorestart=true
user=root
numprocs=8
redirect_stderr=true
stdout_logfile=/var/www/html/bcbAPI/storage/logs/worker.log

[program:laravel-worker2]
process_name=%(program_name)s_%(process_num)03d
command=/usr/bin/laravel-echo-server laravel-echo-server start --dir=/var/www/html/bcbAPI
autostart=true
autorestart=true
user=root
redirect_stderr=true
stdout_logfile=/var/www/html/bcbAPI/storage/logs/echoserver.log
stderr_logfile=/var/www/html/bcbAPI/storage/logs/echoserver-error.log

我尝试过的其他方法

[program:laravel-worker2]
process_name=%(program_name)s_%(process_num)03d
directory=/var/www/html/bcbAPI
command=/usr/bin/laravel-echo-server start
autostart=true
autorestart=true
user=root
redirect_stderr=true
stdout_logfile=/var/www/html/bcbAPI/storage/logs/echoserver.log

运行主管

sudo supervisorctl reread

sudo supervisorctl update

sudo supervisorctl start laravel-worker:*

日志文件为空。我究竟做错了什么?如果我在 usr/bin 目录中,我可以启动服务器

最佳答案

首先你需要全局安装 laravel-echo-server see here for more detail laravel-echo-server.json 应该放在你的项目根目录中。

然后你需要创建两个主管配置。一个用于队列,另一个用于 laravel 回显服务器,如下所示:

laravel-queue-worker.conf

[program:laravel-queue-worker]
process_name=%(program_name)s
command=php **project_absolute_path**/artisan horizon
autostart=true
autorestart=true
user=rana
redirect_stderr=true
stdout_logfile=/var/log/laravel-queue-worker.log

laravel-echo-server.conf

[program:laravel-echo-server]
process_name=%(program_name)s
command=laravel-echo-server start --dir=**project_absolute_path**
autostart=true
autorestart=true
user=rana
redirect_stderr=true
stdout_logfile=/var/log/laravel-echo-server.log

**项目绝对路径示例:/var/www/html/laravel **

关于linux - 无法使用主管启动 laravel-echo-server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48273526/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com