Monday, April 30, 2018

Run Supervisor on CloudFoundry - development

Run Supervisor on CloudFoundry

Is there a way to install an run Supervisor in the php-buildpack of CloudFoundry?

I have a Laravel app and wan’t some monitored background processes to work on queued jobs.

I can install supervisor with the apt-buildpack, but when ever i wan’t to start supervisor with supervisord -c supervisord.conf i get the following error:

Traceback (most recent call last):
File "/home/vcap/deps/0/bin/supervisorctl", line 5, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

This is my supervisord.conf:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/vcap/app/artisan queue:work --tries=3
autostart=true
autorestart=true
user=vcap
numprocs=2
redirect_stderr=true
stdout_logfile=/home/vcap/app/storage/logs/worker.log



from Laravel Questions and Answers https://laravelquestions.com/laravel/run-supervisor-on-cloudfoundry/
via Lzo Media

No comments:

Post a Comment