Skip to content

Commit

Permalink
added deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
BadChoice committed Mar 22, 2018
1 parent 237eaf1 commit 4228951
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

main() {
# Getting last version
git pull

# Shutdown the laravel app
php artisan down

# Install new composer packages
composer install --no-dev --prefer-dist --optimize-autoloader

# Cache boost configuration and routes
php artisan cache:clear
php artisan config:cache
php artisan route:cache
php artisan queue:restart

# Sync database changes
if [ "$1" == "migrate" ]
then
php artisan migrate
fi

# Rise from the ashes
php artisan up

echo ''
echo '🔥 Deploy finished 🔥'
echo ''
}

main $1

0 comments on commit 4228951

Please sign in to comment.