Skip to content

Instantly share code, notes, and snippets.

@StanleyMasinde
Created January 24, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StanleyMasinde/905fa6465339e2adfa30b2589289aeec to your computer and use it in GitHub Desktop.
Save StanleyMasinde/905fa6465339e2adfa30b2589289aeec to your computer and use it in GitHub Desktop.
#!/bin/bash
# Update the server with the latest changes
# Put the application in maintenance mode
php artisan down
echo "The Application in in maintenance mode"
# Git pull from remote
echo "Starting the update"
git pull
echo "All changes have been received"
# Clear the application cache and cache them again
php artisan optimize
echo "App's configuration is updated"
# Bring the application up
php artisan up
echo "Update complete"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment