-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Horizon Support #361
Comments
@nckrtl: I just added some ToDos for myself above. Any other ideas that need to be added to this list, let me know. Next week I will be partially out of the office, but I will start diving into this when I return the week after 👍 |
Looks complete to me. Still need to verify assumptions as discussed on Discord. Will give it this weekend a try. |
Alright, I did a test and can confirm everything is working as expected with setting the horizon docker service order to
Because of the start-first a new container will start upon a new deployment while the old one will stay active and finish until horizon terminates gracefully. Made a video to demo it all. Might take a bit before the quality is bumped enough by YT for it to be watchable. |
Hey @nckrtl, I put this on our Discord thread, but it's probably more appropriate to ask on this GitHub Thread. Just to confirm, after seeing your PR get merged (laravel/horizon#1454), we still need to run this script to gracefully bring the horizon processes down, correct? https://github.com/jaydrogers/horizon-test/blob/main/entrypoint/horizon.sh |
✅ Big update & solutionSo after months of testing, the solution to this is:
Background on stop signalsPHP-FPM requires My solution to make FPM & S6 Overlay both happy
A full exampleThis shows how we can use stop signals where we need them and configure health checks with the new native health checks for Laravel: services:
php:
image: my/laravel-app
redis:
image: redis:6
command: "redis-server --appendonly yes --requirepass redispassword"
horizon:
image: my/laravel-app
command: ["php", "/var/www/html/artisan", "horizon"]
stop_signal: SIGTERM # Set this for graceful shutdown if you're using fpm-apache or fpm-nginx
healthcheck:
# This is our native healthcheck script for Horizon
test: ["CMD", "healthcheck-horizon"]
start_period: 10s I just want to add a HUGE SHOUTOUT to @nckrtl for all of his help through this journey. This was one of the most complicated issues I've debugged in my 19 years of my system administration experience. I would've gotten nowhere without @nckrtl's help. 🙌 |
Background
I've been working with @nckrtl on optimizing Horizon support
Related Discord Discussion
https://discord.com/channels/910287105714954251/1235899514867683430
Research Solution
Documentation
The text was updated successfully, but these errors were encountered: