Created
October 21, 2020 06:53
-
-
Save Aleksandar-Mitic/3553ea332fe32e54579ee642a10ce1b6 to your computer and use it in GitHub Desktop.
Production linux script for updating laravel codebase from git & restarting services
This file contains 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 characters
#!/bin/bash | |
set -x | |
git reset --hard HEAD | |
git pull | |
composer install --no-interaction --no-dev | |
#php artisan route:cache | |
php artisan event:cache | |
php artisan view:cache | |
php artisan config:cache | |
#php artisan optimize | |
composer dump-autoload --no-interaction --no-dev --optimize --classmap-authoritative | |
systemctl reload php7.4-fpm.service | |
php artisan queue:restart | |
# Optional if queue or horizon config has changed | |
#sudo supervisorctl reread | |
#sudo supervisorctl update | |
#sudo supervisorctl start all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment