How edit supervisor settings #228
-
|
I'm not sure but I think since it uses s6-overlay supervisor file conf is different. I know that there is a supervisor env to set the command, but how can we tweak this file. I'm using laravel, and to make queues work with the laravel itself I need to run two containers one for laravel other for laravel queues. If there is a doc I would appreciate too. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 7 replies
-
|
@insign Would you mind sharing the exact command you're using on the second container to handle the Laravel queue processing? I think one possible alternative is to use a per-minute crontab, as writen in the Laravel documentation. |
Beta Was this translation helpful? Give feedback.
-
|
@shinsenter
SUPERVISOR_PHP_COMMAND="php artisan horizon"
If I put it in the main container, the laravel itself stops working. BTW, Laravel Horizon is a better controller for queues.
|
Beta Was this translation helpful? Give feedback.
-
|
I want to edit it due to a weird but that the jobs are ran fine, marked as done but after some minutes que supervisor tries to run it again and since I marked the job run only once, it fails as "Max attempts to run" and the job was marked as successful now is marked and failed and keeps trying forever. But since in that pov is a problem to me solve, I just asked in how can I try to tweak s6-overlay supervisor. P.S: I don't know why SUPERVISOR_PHP_COMMAND breaks the main php thread, maybe it is used main/traditional php requests? |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly - when you override the command using the I think there’s no issue with the “one container – one process” design if you run the web server and Horizon in two separate containers. |
Beta Was this translation helpful? Give feedback.
-
For that issue I just want to know how change or investigate the supervisor settings |
Beta Was this translation helpful? Give feedback.
-
|
The Laravel Docker image I provide uses Additionally, as I mentioned earlier, you can configure a crontab for Laravel Horizon using the |
Beta Was this translation helpful? Give feedback.
-
|
Thanks I'll check these docs!
|
Beta Was this translation helpful? Give feedback.
-
|
@insign I can only offer temporary suggestions like this because I don’t want to complicate the configuration of my Docker images. This would go against my original goal of providing simple, user-friendly Docker images. |
Beta Was this translation helpful? Give feedback.
-
|
@insign These Docker images with the new variable will be built within the next 24 hours and are available under the |
Beta Was this translation helpful? Give feedback.
@insign
I gave myself a little challenge and added a new environment variable
LARAVEL_ENABLE_HORIZONto the Laravel Docker images. When this variable is set to1, it will run an additional service for Laravel Horizon (assuming the Laravel Horizon package is already installed).These Docker images with the new variable will be built within the next 24 hours and are available under the
dev-tags. Feel free to give them a try if you’re interested.http://hub.docker.com/r/shinsenter/laravel/tags?name=dev-