Last active
August 22, 2017 20:05
-
-
Save scrubmx/aaa80be39779f7d2d203dc2deef56497 to your computer and use it in GitHub Desktop.
Laravel deploy script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Change to the project directory | |
| cd /home/forge/appname.com | |
| # Put the application into maintenance mode | |
| php artisan down | |
| # Get the latests changes | |
| git pull origin master | |
| # Install composer dependecies | |
| composer install --no-interaction --no-dev --prefer-dist | |
| # Run database migrations | |
| php artisan migrate --force | |
| # Cache the application routes | |
| php artisan route:clear | |
| php artisan route:cache | |
| # Cache the configuration files | |
| php artisan config:clear | |
| php artisan config:cache | |
| # Flush expired password reset tokens | |
| php artisan auth:clear-resets | |
| # Optimize the framework for better performance | |
| php artisan optimize --force | |
| # Submit a deployment notification to bugsnag | |
| # php artisan bugsnag:deploy \ | |
| # --repository "https://github.com/scrubmx/appname" \ | |
| # --branch "master" \ | |
| # --revision "$(git rev-parse HEAD)" | |
| # Restart the queue workers | |
| sudo supervisorctl restart appname | |
| # Bring the application out of maintenance mode | |
| php artisan up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment