当我创建两个文件时:
horizon-staging.conf
[program:horizon]
process_name=%(program_name)s
command=php /var/www/staging/current/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=truehorizon-production.conf
[program:horizon]
process_name=%(program_name)s
command=php /var/www/production/current/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=true然后启动命令sudo supervisorctl start horizon。它能同时运行两个程序吗?(附带的问题是,我也可以把这个放在一个conf文件中吗?)
发布于 2020-08-17 12:19:22
不是的。
程序的名称与应用程序的名称没有严格的关系。正确的途径应该是创建一个水平阶段和这样的地平线生产:
[program:horizon-staging]
process_name=horizon
command=php /var/www/staging/current/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=true
[program:horizon-production]
process_name=horizon
command=php /var/www/production/current/artisan horizon
autostart=true
autorestart=true
user=forge
redirect_stderr=true所以它有两个入口点的选项。
是的,您可以在同一个conf中声明两个不同的程序。
https://serverfault.com/questions/1030438
复制相似问题