Skip to content

Instantly share code, notes, and snippets.

@rseon
Last active November 29, 2021 11:00
Show Gist options
  • Save rseon/001d612b5a1181b8e1167a1ad3082562 to your computer and use it in GitHub Desktop.
Save rseon/001d612b5a1181b8e1167a1ad3082562 to your computer and use it in GitHub Desktop.
Deploy Laravel

Deploy a Laravel project on your server

Create bash file

Only once on your server

Create a deploy.sh file at the root of your project :

#!/usr/bin/env bash
git pull origin master
php artisan down
npm install
npm run development
composer install --no-suggest --optimize-autoloader
php artisan config:cache
php artisan route:cache
php artisan up
php artisan queue:restart
chown -R www-data:www-data .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment