36 lines
769 B
Bash
36 lines
769 B
Bash
#!/bin/bash
|
|
set -x
|
|
|
|
#Deployment script
|
|
|
|
# Change to the project directory passed as an argument
|
|
cd $1
|
|
|
|
# Turn on maintenance mode
|
|
#php artisan down
|
|
|
|
# Install/update composer dependecies
|
|
/opt/cpanel/composer/bin/composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
|
|
#composer install --no-interaction --prefer-dist --optimize-autoloader
|
|
/opt/cpanel/composer/bin/composer dump-autoload
|
|
|
|
# Run database migrations
|
|
php artisan migrate --force
|
|
|
|
# Clear caches
|
|
php artisan cache:clear
|
|
|
|
# Clear expired password reset tokens
|
|
php artisan auth:clear-resets
|
|
|
|
# Clear and cache routes
|
|
php artisan route:clear
|
|
php artisan route:cache
|
|
|
|
# Clear and cache config
|
|
php artisan config:clear
|
|
php artisan config:cache
|
|
|
|
# Turn off maintenance mode
|
|
#php artisan up
|