https://github.com/koomai/laravel-horizon-local
Run Laravel Horizon locally to monitor remote queued jobs
https://github.com/koomai/laravel-horizon-local
laravel laravel-application laravel-horizon laravel-valet
Last synced: 3 months ago
JSON representation
Run Laravel Horizon locally to monitor remote queued jobs
- Host: GitHub
- URL: https://github.com/koomai/laravel-horizon-local
- Owner: koomai
- License: mit
- Created: 2019-08-27T05:49:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:58:45.000Z (over 2 years ago)
- Last Synced: 2025-01-17T19:44:09.850Z (4 months ago)
- Topics: laravel, laravel-application, laravel-horizon, laravel-valet
- Language: PHP
- Size: 3.67 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Horizon Local
Run Laravel Horizon locally to monitor your queued jobs on the server using SSH port forwarding.
I've found it useful in cases where I don't want to publish assets and create web routes for an API-only application.
## Prerequisite
If you don't use an SSH configuration files, google "SSH config file". For example, your `~/.ssh/config` may have the
following entry:```
Host staging-2
Hostname 10.10.10.10
User ec2-user
PreferredAuthentications publickey
IdentityFile "/Users/johndoe/.ssh/id_rsa"
```## Usage
1. Clone this repository.
```
git clone [email protected]:koomai/laravel-horizon-local.git
```2. Install dependencies and publish Horizon assets.
```
composer install
php artisan horizon:install
```3. Add local and remote ports to your Redis instance in your `.env` file (if different from the defaults below):
```
REDIS_HOST=127.0.0.1
REDIS_PORT=6380REMOTE_REDIS_HOST=127.0.0.1
REMOTE_REDIS_PORT=6379
```4. Run the artisan command below to start the SSH tunnel to your remote server as defined in your configuration file, e.g. `staging-2`
```
php artisan ssh:tunnel staging-2
```5. Run `php artisan serve` (or see [Laravel Valet](https://laravel.com/docs/5.8/valet) if you're using MacOS).
6. Go to `/horizon` on your browser to view your remote queued jobs.