-
-
Save burnz/77c98e3e5e73f34078024c1a1d4bb6dd to your computer and use it in GitHub Desktop.
Revisions
-
ankurk91 revised this gist
May 17, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ **Install [redis-server](https://redis.io/)** * Using [PPA](https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server) for latest version ``` sudo add-apt-repository -y ppa:chris-lea/redis-server sudo apt-get update sudo apt-get install -y redis-server ``` -
ankurk91 revised this gist
Apr 11, 2019 . 1 changed file with 15 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,21 @@ redis-cli QUEUE_CONNECTION=redis ``` * Note: other redis configurations are not need to be updated, the default host and port should work fine. * **Configure redis server** * To make redis-server autostart upon reboot, * Open file with `sudo nano /etc/redis/redis.conf` * Find `supervised` section and update its value from `no` to `systemd` * Save and exit the conf file. * Enable the service with this command ``` sudo systemctl enable redis-server.service ``` * Try restarting the service now. ``` sudo systemctl status redis-server.service sudo systemctl restart redis-server.service ``` * We are good now. **Install [supervisor](http://supervisord.org/)** ``` -
ankurk91 revised this gist
Apr 11, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ``` sudo add-apt-repository ppa:chris-lea/redis-server sudo apt-get update sudo apt-get install -y redis-server ``` * Test if `redis-server` is working, run ``` -
ankurk91 revised this gist
Apr 11, 2019 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,7 @@ * For now it should show status as `inactive` on dashbaord **Install [redis-server](https://redis.io/)** * Using [PPA](https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server) for latest version ``` sudo add-apt-repository ppa:chris-lea/redis-server sudo apt-get update -
ankurk91 revised this gist
Mar 24, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ QUEUE_CONNECTION=redis ``` sudo apt install supervisor sudo service supervisor restart sudo systemctl enable supervisor ``` **Create supervisor config for Horizon** -
ankurk91 revised this gist
Mar 17, 2019 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,7 +43,7 @@ sudo systemctl enable supervisord * Supervisor keeps its programs' individual files in `/etc/supervisor/conf.d` * Create a fresh config file for your Laravel application ``` sudo nano /etc/supervisor/conf.d/your-laravel-app.conf ``` * and paste these lines into nano editor ``` @@ -80,8 +80,7 @@ php artisan horizon:terminate ``` sudo service supervisor restart ``` * OR -You can restart specific program ``` sudo supervisorctl restart laravel_horizon ``` -
ankurk91 revised this gist
Mar 16, 2019 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -88,5 +88,4 @@ sudo supervisorctl restart laravel_horizon ### Resources * https://serversforhackers.com/c/monitoring-processes-with-supervisord * https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04 -
ankurk91 revised this gist
Mar 16, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,7 +30,7 @@ redis-cli QUEUE_CONNECTION=redis ``` * Note: other redis configurations are not need to be updated, the default host and port should work fine. * :warning: In order to auto-restart redis server upon reboot, you need to follow [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04) **Install [supervisor](http://supervisord.org/)** ``` -
ankurk91 revised this gist
Mar 9, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Laravel Horizon, redis-server, supervisord on Ubuntu 16/18 server > Laravel 5.8, Horizon 3.x, Redis 5.x **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) -
ankurk91 revised this gist
Dec 28, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,6 +30,7 @@ redis-cli QUEUE_CONNECTION=redis ``` * Note: other redis configurations are not need to be updated, the default host and port should work fine. * :warning: In order to auto-restart redis server upon reboot, you need to follow [this guide](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04) **Install [supervisor](http://supervisord.org/)** ``` -
ankurk91 revised this gist
Dec 28, 2018 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,4 +86,6 @@ sudo supervisorctl restart laravel_horizon ``` ### Resources * https://serversforhackers.com/c/monitoring-processes-with-supervisord * https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04 * https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04 -
ankurk91 revised this gist
Dec 18, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,8 +56,8 @@ user=www-data stdout_logfile=/home/ubuntu/your-project-folder/storage/horizon.log ``` * You need to update `your-project-folder` path in above config * Make sure your project `storage` folder is writable by `www-data` (apache) user * Save the config file and exit `nano` * Now run these commands one by one - ``` sudo supervisorctl reread -
ankurk91 revised this gist
Dec 11, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Laravel Horizon, redis-server, supervisord on Ubuntu 16/18 server > Laravel 5.7, Horizon 1.4, Redis 5.x **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) -
ankurk91 revised this gist
Dec 4, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -84,3 +84,6 @@ OR ``` sudo supervisorctl restart laravel_horizon ``` ### Resources * https://serversforhackers.com/c/monitoring-processes-with-supervisord -
ankurk91 revised this gist
Nov 27, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ redis-cli ``` QUEUE_CONNECTION=redis ``` * Note: other redis configurations are not need to be updated, the default host and port should work fine. **Install [supervisor](http://supervisord.org/)** ``` -
ankurk91 revised this gist
Nov 10, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ## Laravel Horizon, redis-server, supervisord on Ubuntu 16/18 server > Laravel 5.7, Horizon 1.4, Redis 4.x **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) -
ankurk91 revised this gist
Nov 10, 2018 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ ## Laravel Horizon, redis-server, supervisord on Ubuntu server > Laravel 5.7, Horizon 1.4, redix 4.x **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) * Make sure you can access the Horizon dashboard like - `http://yourapp.com/horizon` @@ -25,7 +27,7 @@ redis-cli * Update your Laravel application `.env` file like this - ``` QUEUE_CONNECTION=redis ``` * Note: other redis configurations no need to be updated, the default host and port should work fine. @@ -66,9 +68,9 @@ sudo supervisorctl update sudo supervisorctl ``` * You will see process name with status `RUNNING`, if not; it means you have misconfigured something. * Access your horizon dashboard at `http://yourapp.com/horizon`, you can see status as `active` on dashboard. * Make sure to run these commands after each new deployment ``` php artisan horizon:purge php artisan horizon:terminate -
ankurk91 revised this gist
Nov 4, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -65,7 +65,7 @@ sudo supervisorctl update ``` sudo supervisorctl ``` * You will see process name with status `RUNNING`, if not; it means you have misconfigured something. * Access your horizon dashboard at `http://yourapp.com/horizon`, you can see status as active in dashboard. * Make sure to run these command after each new deployment -
ankurk91 revised this gist
Sep 15, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,7 +27,7 @@ redis-cli ``` QUEUE_DRIVER=redis ``` * Note: other redis configurations no need to be updated, the default host and port should work fine. **Install [supervisor](http://supervisord.org/)** ``` @@ -53,7 +53,7 @@ redirect_stderr=true user=www-data stdout_logfile=/home/ubuntu/your-project-folder/storage/horizon.log ``` * You need to update `your-project-folder` path in above config * Make sure `storage` folder is writable by `www-data` (apache) user * Save the config and exit `nano` * Now run these commands one by one - @@ -65,8 +65,8 @@ sudo supervisorctl update ``` sudo supervisorctl ``` * You will see process name with status `RUNNING`, if not it means you have misconfigured something. * Access your horizon dashboard at `http://yourapp.com/horizon`, you can see status as active in dashboard. * Make sure to run these command after each new deployment ``` -
ankurk91 revised this gist
Sep 1, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -77,4 +77,8 @@ php artisan horizon:terminate ``` sudo service supervisor restart ``` OR * You can restart specific program ``` sudo supervisorctl restart laravel_horizon ``` -
ankurk91 revised this gist
Sep 1, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,6 +33,7 @@ QUEUE_DRIVER=redis ``` sudo apt install supervisor sudo service supervisor restart sudo systemctl enable supervisord ``` **Create supervisor config for Horizon** -
ankurk91 revised this gist
Sep 1, 2018 . 1 changed file with 20 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ ## Laravel Horizon, redis-server, supervisord on Ubuntu server **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) * Make sure you can access the Horizon dashboard like - `http://yourapp.com/horizon` * For now it should show status as `inactive` on dashbaord **Install [redis-server](https://redis.io/)** * With default respositories (may get older version) @@ -22,6 +23,12 @@ redis-cli * Type `ping` and you will recieve `PONG` in response * Type `exit` to exit the CLI * Update your Laravel application `.env` file like this - ``` QUEUE_DRIVER=redis ``` * Note: other redis configurations no need to be updated, the default host and post should work fine. **Install [supervisor](http://supervisord.org/)** ``` sudo apt install supervisor @@ -30,11 +37,11 @@ sudo service supervisor restart **Create supervisor config for Horizon** * Supervisor keeps its programs' individual files in `/etc/supervisor/conf.d` * Create a fresh config file for your Laravel application ``` sudo nano /etc/supervisor/conf.d/your-app-name.conf ``` * and paste these lines into nano editor ``` [program:laravel_horizon] process_name=%(program_name)s_%(process_num)02d @@ -47,7 +54,7 @@ stdout_logfile=/home/ubuntu/your-project-folder/storage/horizon.log ``` * You need to update project folder path in above config * Make sure `storage` folder is writable by `www-data` (apache) user * Save the config and exit `nano` * Now run these commands one by one - ``` sudo supervisorctl reread @@ -58,9 +65,15 @@ sudo supervisorctl update sudo supervisorctl ``` * You will see process name with `RUNNING` status, if not it means you have misconfigured something. * Access your horizon dashboard at `http://yourapp.com/horizon` , you can see status as active n dashboard. * Make sure to run these command after each new deployment ``` php artisan horizon:purge php artisan horizon:terminate ``` * If you face any issue, you can restart supervisor service ``` sudo service supervisor restart ``` -
ankurk91 revised this gist
Aug 23, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,7 +22,7 @@ redis-cli * Type `ping` and you will recieve `PONG` in response * Type `exit` to exit the CLI **Install [supervisor](http://supervisord.org/)** ``` sudo apt install supervisor sudo service supervisor restart @@ -32,7 +32,7 @@ sudo service supervisor restart * Supervisor keeps its programs' individual files in `/etc/supervisor/conf.d` * Create a fresh config for your laravel application ``` sudo nano /etc/supervisor/conf.d/your-app-name.conf ``` * and paste these lines ``` -
ankurk91 revised this gist
Aug 23, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,5 +62,5 @@ sudo supervisorctl ``` QUEUE_DRIVER=redis ``` * Access your horizon dashboard at `http://yourapp.com/horizon` , you can see status as active. -
ankurk91 created this gist
Aug 23, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,66 @@ ### Laravel Horizon, redis-server, supervisord on Ubuntu server **Parepare application** * Install and configure Laravel Horizon as instructed in [docs](https://laravel.com/docs/horizon) * Make sure you can access the Horizon dashboard like - `http://yourapp.com/horizon` **Install [redis-server](https://redis.io/)** * With default respositories (may get older version) ``` sudo apt-get install redis-server ``` * OR You can use [PPA](https://launchpad.net/~chris-lea/+archive/ubuntu/redis-server) for latest version ``` sudo add-apt-repository ppa:chris-lea/redis-server sudo apt-get update sudo apt-get install redis-server ``` * Test if `redis-server` is working, run ``` redis-cli ``` * Type `ping` and you will recieve `PONG` in response * Type `exit` to exit the CLI **Install [supervisord](http://supervisord.org/)** ``` sudo apt install supervisor sudo service supervisor restart ``` **Create supervisor config for Horizon** * Supervisor keeps its programs' individual files in `/etc/supervisor/conf.d` * Create a fresh config for your laravel application ``` sudo nano /etc/supervisor/conf.d/your-app.conf ``` * and paste these lines ``` [program:laravel_horizon] process_name=%(program_name)s_%(process_num)02d command=php /home/ubuntu/your-project-folder/artisan horizon autostart=true autorestart=true redirect_stderr=true user=www-data stdout_logfile=/home/ubuntu/your-project-folder/storage/horizon.log ``` * You need to update project folder path in above config * Make sure `storage` folder is writable by `www-data` (apache) user * Save the config and exit nano * Now run these commands one by one - ``` sudo supervisorctl reread sudo supervisorctl update ``` * Check if our horizon process is running ``` sudo supervisorctl ``` * You will see process name with `RUNNING` status, if not it means you have misconfigured something. * Update your Laravel application `.env` like this - ``` QUEUE_DRIVER=redis ``` * Access your horizon dashboard, you can see status as active.