Atomic deployments are the first in the series of pipeline templates that we introduced to Buddy.
In short, they allow you to update your website with zero downtime by uploading the files a cache directory on the server and switching the symlink of the web server to the new version when everything’s finished.
Recently we’ve modified the template by adding a feature that lets you define how many website versions you want to keep on the server.
This setting is useful to prevent the disk from getting full. By default the number of cached versions in 10. To change it, expand More Options at the bottom of the template details:
How atomic deployments work
INFO: If you’d like to read about Atomic Deployments in detail, check out our feature here.
The template requires SFTP installed on the server and consists of two actions: SFTP and SSH. It creates a couple of directories on the server to which the files are uploaded and stored:
/current- the directory to which your web server points. It contains a symbolic link to the current website version in the
/releases- contains the history of uploaded releases. For each version, a directory with the name of the release tag is created. This allows for a quick rollback of changes.
/deploy-cache- used for storing new files during the deployment. Once the upload has finished, its contents are copied to a new directory in the
WARNING: Buddy only deploys files resulting from the changeset between the current and uploaded revision to the
/deploy-cachefolder. There’s no need to clear the cache on every deployment.