How long your web app is down for deployment?
I usually deploy the web app I work on several times a week. Sometimes I do that even twice a day. The web app is not business critical and it is okay to have downtimes while the web app is being deployed. But having the product unavailable for the customers still made me feel bad and less than 1 minute of each deploy seemed lasting for soooo long.
"You Can't Improve What you Don't Measure". So before improving the deployment process itself I decided to measure what exact time does each downtime take. Here was the simplest solution for my deploy bash script:
timeDown=$(date -u +"%s") # php artisan down # the rest of build commands here # php artisan up timeUp=$(date -u +"%s") timeDiff=$(($timeUp-$timeDown)) echo "Application was down during $timeDiff seconds."
If you are (like me) a happy customer of Laravel Forge you can do this measurement easily!
- Update your Deploy Script to include the missing bash commands from the listing above.
- After each deployment see the measured time by clicking View Latest Deployment Log button on a Site Details page.