Magento 2 Zero Downtime Deployment is the Extension that solves your problems with the 503 maintenance pages during deployment time. It prevents your website from breaking and you from losing potential customers even when running the deployment commands.
Moreover, the configuration is really simple. So let's get to it.
Following steps to configure Magento 2 Zero Downtime Deployment extension:
1. Navigate to Stores > Configuration > Magefan Extensions > Zero Downtime Deployment.
2. Enable the Extension.
3. Enable the Pull From Git option in case you use git.
Note: once you enable this option the extension will run a command to pull the new code from your git repository during the deployment.
4. Enable the Pull From Composer option if you want to use the composer.
Note: once you enable this option the extension will run the composer install command to get a new code via composer during deployment.
5. Enter the Composer CLI Command.
Note: depending on your environment you can choose some specific composer CLI commands.
e.g. php -dmemory_limit=-1 /ysr/bin/composer or composer --ignore-platform-reqs or composer.phar
6. Select the Static Content Deploy option. You can Deploy Only Enabled Themes or Deploy All Themes.
7. Choose whether to Enable all Caches After Deploy since sometimes some of them can be disabled after deployment.
Once you finish with the configuration don't forget to Save Config and enjoy the deploying with no website performance interruptions.