Will forge be updated to use Horizon configuration when using workers?
I just had the same thought! :)
馃憤
It appears as though horizon is intended to be added to the application you're deploying if I'm understanding this correctly. So if it were added to Forge, it'd be Taylor adding it to monitor his own workers. You'd still need to add it to your application.
@bkuhl Well you still need to keep it running with something like supervisord.
However on Forge you can only run workers with supervisord not horizon itself. :)
Run it as a daemon on the server?
You run php artisan horizon under a Supervisor process then part of the deployment strategy is to call php artisan horizon:terminate right at the end (replacing where you would call php artisan queue:restart, which Supervisor will then start again.
Quote from forge.laravel.com
Dead Simple Queues
Easily start and manage supervised Laravel Queue workers directly from Forge. No more manual Supervisor configuration.
@jbrooksuk Yet you are suggesting manual configuration. ;)
The question was about Forge, that (when) will It get updated to support it from the web panel...
Not how to do it. I know how to do it. I guess @mdurao also knows how to do it.
@hocza bingo!
I'm still honestly curious as why running a Daemon for Horizon isn't good for you guys? You can have php artisan:horizon running, and call the terminate method in your deployment scripts.
To me, that's pretty much how you _should_ be using it with Forge, I'm not sure what you're expecting more?
@jpmurray do you have a Forge account?
Have you ever setup a queue worker with Forge?
@hocza what do you think is wrong with @jpmurray comment?
To me, that's pretty much how you should be using it with Forge, I'm not sure what you're expecting more?
I'm not expecting anything more, I was just wondering if the Queues would be updated or added this functionality in the forge interface.
If it's supposed to be running as a Daemon, in the Server tab, instead of running in the Site tab... fine by me.
@themsaid nothing. I just realized what he was suggesting by reading @mdurao 's last comment.
(but still an odd solution compared to what cool thing we have at the moment)
Once you configure horizon as a daemon on your site. Should the workers from the config/horizon.php start automatically as they do on local?


Or do we need to configure anything else for horizon to work?
I'm using a base php 5.6 machine upgraded to php 7.1 through the forge admin panel, if it's of any use.
@mdurao I see what you want. Honestly, it seems more of a cosmetic change in Forge's UI that anything else. Could they also add a daemon tab to the sites? Sure why not. But you'd probably still need to put the whole path to your artisan file anyway.
I'm not saying having a button somewhere to just "click and activate horizon on this site" wouldn't be cool (hey, I'd click that button all the time!). I'm just saying I don't think it's _necessary_, since we can use it perfectly already. And well, we probably all are going to use Horizon, but not everybody will. The queue interface _needs_ to stay the same so people working with SQS or whatnot can still use the other commands...
And @hocza, yes I do. And The solution isn't at all odd, it works! Supervisor is used to monitor Horizon's process, and the way to use Supervisor outside regular queues command in Forge is going to the daemon tab. Seems pretty logical to me.
Anyway, we all just want to use Horizon's better, this is cool. But, I'm going to suggest( @themsaid ) that this issue should be closed. This isn't regarding Horizon, it should not be in its issues, this is a request for a Forge feature, we should just campaign via Forge's support for a change in the UI if we want to.
As @jpmurray suggested, i'm closing this issue.
Hi @TJSoler,
I just stumbled across the same issue while deploying a site via Forge (couldn't see the Horizon Dashboard's "Current Workload" list or any supervisor instances).
Turned out I was using an APP_ENV value of "staging", and therefore /config/horizon.php was missing its required "environments.[APP_ENV]" key/value.
I added the missing "environments.staging" key/value (duplicated my "environments.local" key/value), redeployed my Forge site, and the issue was resolved.
Cheers!
@furey Thank you bud! Wasted a few hours trying to figure out what was going on and this was my issue as well.
For anybody else who comes across this, only production and local are defined in /config/horizon.php by default, so if you deploy to a server where your APP_ENV is anything other than these two strings, make sure you update the config file accordingly!
Most helpful comment
As @jpmurray suggested, i'm closing this issue.