Documentation

Didn't know where to start? Here we have something might be useful.

Deployment Script

Overview

As described inside the Overview 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 Settings 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.

Replacer

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

{ROOTPATH} Path to /home/<username>/webapps/<web app name>
{RELEASE} The current release version being deployed
{RELEASEPATH} Path to /home/<username>/webapps/<web app name>/releases/{RELEASE}
{CONFIGPATH} Path to /home/<username>/webapps/<web app name>/configs
{STORAGEPATH} Path to /home/<username>/webapps/<web app name>/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

For example this:

cd {RELEASEPATH}
{PHP72} artisan migrate --force

Will be translated to this:

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