Add .cpanel.yaml for cPanel deploy
This commit is contained in:
parent
35f18dc595
commit
9558ee2f06
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
deployment:
|
||||
tasks:
|
||||
- export DEPLOYPATH=/home/onlin401/public_html/allgreektome/backend/
|
||||
- /bin/cp -R app $DEPLOYPATH
|
||||
- /bin/cp -R bootstrap $DEPLOYPATH
|
||||
- /bin/cp -R config $DEPLOYPATH
|
||||
- /bin/cp -R public $DEPLOYPATH
|
||||
- /bin/cp -R resources $DEPLOYPATH
|
||||
- /bin/cp -R database $DEPLOYPATH
|
||||
- /bin/cp -R routes $DEPLOYPATH
|
||||
- /bin/cp -R storage $DEPLOYPATH
|
||||
- /bin/cp -R tests $DEPLOYPATH
|
||||
- /bin/cp -R app $DEPLOYPATH
|
||||
- /bin/cp -R composer.json $DEPLOYPATH
|
||||
- /bin/cp -R composer.lock $DEPLOYPATH
|
||||
- /bin/cp -R artisan $DEPLOYPATH
|
||||
- /bin/cp -R package.json $DEPLOYPATH
|
||||
- /bin/cp -R phpunit.xml $DEPLOYPATH
|
||||
- /bin/cp -R README.md $DEPLOYPATH
|
||||
- /bin/cp -R webpack.mix.js $DEPLOYPATH
|
||||
- /bin/cp -R deploy.sh $DEPLOYPATH
|
||||
- /bin/chmod +x $DEPLOYPATH/deploy.sh
|
||||
- $DEPLOYPATH/deploy.sh $DEPLOYPATH
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#!/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
|
Loading…
Reference in New Issue