[Laravel]rsyncによるデプロイ


## deploy server
echo -e "\ndeploy server"
echo -e "\n"

npm install
npm install --prefix ./resources/frontend/btob
npm run build-deploy
composer install  --no-dev
composer dump-autoload
chmod -R 777 storage

rsync --checksum -av --include '.*' ./ \
-e "ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -i private_key -p xxxxxx" \
hoge@xxx.xxx.xxx.xxx:/var/www/app

## Migration
ssh -o "StrictHostKeyChecking no" xxxxx@xxx.xxx.xxx.xxx -i private_key -p xxxxxx 'cd ~/app' \
'&& php artisan config:clear' \
'&& php artisan cache:clear' \
'&& php artisan view:clear' \
'&& php artisan migrate --force'

 

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *