Back to articles
Deployment Hooks Explained: Running Custom Scripts During Every Deploy
How-ToDevOps

Deployment Hooks Explained: Running Custom Scripts During Every Deploy

via Dev.toDeploynix

Every deployment has the standard tasks — install dependencies, build assets, run migrations, cache configuration, restart queue workers. Deploynix handles all of these automatically. But your application might need more. Maybe you need to seed specific data, terminate Horizon, invalidate a CDN, or ping Slack when a deployment completes. Deploynix's additional deploy commands let you define custom scripts that run alongside every deployment. They're integrated into the deployment pipeline, logged in real-time, and work with both traditional and zero-downtime deployments. Here's how they work. What the Default Deploy Script Already Handles Before adding custom commands, it's important to know what Deploynix does automatically. The default deploy script runs on every deployment and handles: Install Composer dependencies — composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev Install npm dependencies and build assets — npm install and npm run build (if a build scr

Continue reading on Dev.to

Opens in a new tab

Read Full Article
6 views

Related Articles