Skip to content

Instantly share code, notes, and snippets.

@antoninhrlt
Created April 26, 2022 08:39
Show Gist options
  • Save antoninhrlt/5ac397840da6f6cc2155102caac62146 to your computer and use it in GitHub Desktop.
Save antoninhrlt/5ac397840da6f6cc2155102caac62146 to your computer and use it in GitHub Desktop.
Update a laravel project on VPS
# A repository should already be enabled in YOUR_WEBSITE_FOLDER_HERE
# Don't forget to update YOUR_WEBSITE_FOLDER_HERE to your real website path
# YOUR_WEBSITE_FOLDER_HERE : Where you tell to your web server (example: Apache2) where was located your website source
set -e
{
cd YOUR_WEBSITE_FOLDER_HERE
git pull
composer install
npm install
# php artisan migrate
npm run prod
chown www-data:www-data storage/ bootstrap/cache -R
php artisan queue:restart
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment