Deployment Script


As described inside the Getting Started section, Atomic deployment is divided into three tasks, Cloning a new release, installing Composer dependencies and activating the latest release. These are the basic tasks required to get your site running. But in real world usage, you will have plenty of tasks to run before completing the deployment.

You can add to and extend the deployment tasks by including new tasks in the deployment script. Your tasks can either be done before or after then main task.

Cloning a new release

This is where the deployment script will run a clone of your latest code. After the successful clone, we will try to link up the symlinks that you have provided inside the symlink menu.

Installing Composer dependencies

This task will install composer dependencies. General Setting allows you to control whether you want to run a composer installation or not, or you can even opt for installing dev dependencies.

Activating the latest release

After all the other tasks have completed successfully, this task will point your live folder to the latest codebase.

Writing your deployment script

When you write a deployment script, you can choose when to run your script based on the three basic tasks. You can place your custom script before or after running the main tasks.

With Atomic Git Deployment, you don't have to reload your PHP-FPM to clear the PHP Opcache. We will clear it automatically without reloading your PHP.


For a convenience in writing the deployment script, we provide you with a Replacer.

Please take note that replacers for PHP is not usable inside Containerized server because it will use php version of the Web Application.

{ROOTPATH}Path to /home//webapps/
{RELEASE}The current release version being deployed
{RELEASEPATH}Path to /home//webapps//releases/{RELEASE}
{CONFIGPATH}Path to /home//webapps//configs
{STORAGEPATH}Path to /home//webapps//storage
{PHP55}Run PHP-CLI using /RunCloud/Packages/php55rc/bin/php
{PHP56}Run PHP-CLI using /RunCloud/Packages/php56rc/bin/php
{PHP70}Run PHP-CLI using /RunCloud/Packages/php70rc/bin/php
{PHP71}Run PHP-CLI using /RunCloud/Packages/php71rc/bin/php
{PHP72}Run PHP-CLI using /RunCloud/Packages/php72rc/bin/php
{PHP73}Run PHP-CLI using /RunCloud/Packages/php73rc/bin/php
{PHP74}Run PHP-CLI using /RunCloud/Packages/php74rc/bin/php
{PHP80}Run PHP-CLI using /RunCloud/Packages/php80rc/bin/php
{PHP81}Run PHP-CLI using /RunCloud/Packages/php81rc/bin/php
{PHP82}Run PHP-CLI using /RunCloud/Packages/php82rc/bin/php

For example this:

{PHP72} artisan migrate --force

Will be translated to this:

cd /home/runcloud/webapps/myproject/releases/1536424572396
/RunCloud/Packages/php72rc/bin/php artisan migrate --force