A bit of an annoyance Laravel 5.4 gets stuck in maintenance mode when running a script to update codebase. Basically, I am creating a new folder from a git repo, running all the install commands in the new folder, shutting down the current stage before updating the database, then updating a symlink to point the website to the new folder, then bringing up the site...
I can reboot the server or go to the old folder and run php artisan up
to get out of maintenance mode. There is no down
file in storage
in the new folder, and the database has been wiped, so I am pretty lost why Laravel is remembering the old down file.
here is my deploy script for staging:
#!/usr/bin/env bash
f=/var/www/craiglorious.com
DATE=`date +%Y%m%d`
DATEP=$DATE'-StageFromGit'
cd $f
rm -rf $DATEP
git clone https://github.com/iannazzi/craiglorious.git $DATEP
sudo chgrp -R www-data $DATEP
cd $f/$DATEP
git checkout develop
cp $f/env/stag/.env .
composer install
php artisan jwt:secret
npm install
npm run production
sudo chown -R craig:www-data storage
sudo chmod -R ug+w storage
sudo chown -R craig:www-data bootstrap/cache
sudo chmod -R ug+w bootstrap/cache
cd $f/staging
pwd
php artisan down
cd $f/$DATEP
pwd
php artisan zz:dms
cd $f
pwd
rm $f/staging
ln -s $DATEP $f/staging
cd $f/staging
pwd
php artisan up
Any ideas?
EDIT: I think I have the wrong deployment strategy. I probably should be using git.... unsure....