Installing Supervisord in buildpack

Hi there,
I’m trying to deploy a Laravel application following this tutorial: https://www.koyeb.com/tutorials/deploy-a-Laravel-application-with-continuous-deployment-on-Koyeb. It works fine except that for my application, I want to have multiple queue workers running and was thinking of managing them with Supervisor. I don’t know much about buildpacks, but if I understand correctly, it’s impossible to apt get install anything. Is using Supervisor possible in some other way, or is the Docker approach the only viable solution? Thank you in advance!

Hi @Nooke11

I am no buildpack nor Laravel expert, so take my words with a grain of salt.

If you want to run multiple processes, I think you can achieve this with a Procfile (docs with more than just the web: ... line. You could, for example, set it to something like

web: heroku-php-apache2 web/
queueworker1: <command to launch queue>
queueworker2: <command to launch queue>
queueworker3: <command to launch queue>
queueworker4: <command to launch queue>
queueworker5: <command to launch queue>

Assuming that you can launch the queue workers with something like php worker.php.

The Dockerfile approach is surely more flexible, and you can use it to thoroughly configure all the runtime of you application with something like supervisord or, as we did for the log-exporter, s6.

Let me know if I can help you further.

Hi @Leonardo_Barcaroli ,
Thank you for your answer! For development, I do exactly what you suggest with the Procfile, but for production, I want to have a monitor to restart the workers if they stop. I was hoping to avoid using Docker, but I guess I have no other choice. Thanks!

Hey @Nooke11 !

I just had a chat with my colleagues. Unfortunately, we don’t support the multientrypoint in the Procfile. You could then go with the docker+supervisord option, but if you want to have automatic restart of workers and all the goodies (monitoring, alerts, explicit lifecycle tracking) why not directly using the feature we provide as a platform? Just instantiate the queue workers as Koyeb worker services and make them communicate with the web service using our mesh.