一、laradock启用supervisor
1 - Open the .env
file
2 - Set WORKSPACE_INSTALL_SUPERVISOR
and WORKSPACE_INSTALL_PYTHON
to true
.
3 - Create supervisor configuration file (for ex., named laravel-worker.conf
) for Laravel Queue Worker in PHP-worker/supervisord.d/
by simply copy from laravel-worker.conf.example
4 - Re-build the container docker-compose build workspace
Or docker-compose up --build -d workspace
参考这里 https://laradock.io/documentation/#install-supervisor
二、启动PHP-worker
docker-compose up -d PHP-worker
三、进入workspace
docker-compose exec workspace bash
cd example-app
composer require laravel/horizon
PHP artisan horizon:install # 执行完这一步,可以打开 http://localhost/horizon/dashboard 访问,但是status是in-active,这是因为horizon还没有启动,用下面的命令启动就可以了
PHP artisan horizon # 启动horizon,此时horizon的状态会变成active
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。