jonnybarnes.uk/scripts/deploy.sh

23 lines
504 B
Bash
Raw Normal View History

2017-02-27 11:00:09 +00:00
#!/bin/bash
echo "Putting the Laravel app in maintenance mode"
php artisan down
php artisan horizon:terminate
2017-02-27 11:00:09 +00:00
echo "Pulling the latest changes"
git pull
2017-03-24 15:23:14 +00:00
echo "Updating composer and dependencies"
sudo composer self-update
composer install --no-dev --optimize-autoloader
2017-02-27 11:00:09 +00:00
echo "Caching Laravel route and config files"
php artisan route:cache
php artisan config:cache
echo "Restarting the supervisord instances"
2017-03-03 09:47:01 +00:00
sudo supervisorctl restart all
2017-02-27 11:00:09 +00:00
echo "Bringing the Laravel app back online"
php artisan up