Hi,
with enabled zero downtime deployment, the current deploy script will run before the actual going live because the symlinks are automatically changed after running. With e.g. Statamic, there is a command to preheat the cache by crawling the current live site, which is still the old one at the time of deployment. If you do not have enabled zero downtime deployment, you do not have that issue because the site is technically changed within the control of the deployment script. So it would be really cool if there is an additional deploy script variable to execute the symlink change and post-deploy stuff of zero downtime in the script, so that we can do something after that like preheat the cache.
Yes, I do, but that's just giving the new release folder. Problem is that the preheat logic crawls the currently live site and that is still the "old" one at the time of executing the deployment script. So the preheated HTML files will be put into the currently live folder. If we could have the folders switched with a new custom variable, we could be sure to execute the preheating after symlinking to the new folder.
That would also give more flexibility to the zero downtime deployment script since this could be easily done with normal deployments because we control the actual "going live" ourselves on them via git pull, refresh caches etc. This "functionality" is missing on zero downtime deployments.
if [[ {COMMIT_MESSAGE} =~ "[BOT]" ]]; then echo "AUTO-COMMITTED ON PRODUCTION. NOTHING TO DEPLOY." {DO_NOT_NOTIFY} exit 0 fi
cd {RELEASE} git reset --hard git pull composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader {RELOAD_PHP_FPM}
rm -rf public/static/ php8.1 artisan cache:clear
php8.1 artisan config:cache php8.1 artisan route:cache php8.1 artisan view:cache php8.1 artisan event:cache
php8.1 artisan migrate --force
{RESTART_DAEMON ###}
php8.1 artisan statamic:stache:warm # Warm the Statamic stache. php8.1 artisan statamic:search:update --all # Update the search index. php8.1 artisan statamic:assets:generate-presets # Generate all asset presets.
yarn yarn production
echo "🚀 Application deployed!"
Yeah, I'm having the same problem. The queue is still using the previously deployed code. Also, php artisan queue:restart does not results in a hard restart.
