If you are using Git to manage your web application code, you may want to deploy changes to your server as quickly and smoothly as possible. However, using the traditional deployment method of manually uploading files may cause some issues, such as downtime, errors, or inconsistencies.

That’s why RunCloud offers a feature called Atomic Deployment. It creates a continuous deployment pipeline for your site, which allows you to update your web application from directly within your code editor using Git. This allows you to see the changes on your live site within a few seconds.

What Is Atomic Deployment?

Atomic Deployment is a feature that allows you to deploy your web application in a single step, without any downtime or errors. It works by creating a temporary folder on your server, where it clones your Git repository and runs any necessary commands or scripts.

It then creates a symbolic link between the temporary folder and the web root folder, which makes the new code live instantly. Finally, it deletes the old code and cleans up the temporary folder.

By using Atomic Deployment, you can ensure that your web application is always up and running. This also helps you avoid any potential errors or conflicts that may occur during the deployment process.

A Symlink, or a symbolic link, is a special type of file that points to another file or directory. It acts as a shortcut or an alias for the original file or directory.

Atomic Deployment uses Symlinks to switch between the old and new versions of your web application code. You can also use Symlinks to select which files or directories will be automatically synced only if they have been modified. This can help you optimize your deployment process, and save bandwidth and storage space.

If you want to learn more about Symlinks and how they work with Atomic Deployment, please refer to our documentation about Symlinks in Atomic Deployment.

How Do I Use Atomic Deployment?

To use Atomic Deployment you will need to have a RunCloud account, and a server connected to it. You also need to have a Git repository hosted on GitHub, BitBucket, or GitLab, where you store your web application code.

To enable Atomic Deployment, you will need to follow the following steps:

  • Log in to your RunCloud dashboard and select your server.
  • Go to Web Application and select the web application that you want to deploy from Git.
  • Go to Settings and enable Git Integration.
  • Enter your Git repository URL and branch name.
  • Select Atomic Deployment as the deployment method.
  • Optionally, enter any commands or scripts that you want to run before or after the deployment.
  • Save the settings and copy the webhook URL.
  • Go to your Git hosting service and create a webhook with the URL that you copied from RunCloud.
  • Test the webhook by pushing some changes to your Git repository.

Once you have set up the webhook, every time you push your code to your Git repository it will trigger a deployment on RunCloud. You can monitor the status of the deployment on the RunCloud dashboard, or in the notification email that you will receive.

Atomic Deployment is a powerful and convenient feature that can help you improve your web development workflow – and deliver your web application faster and safer.