Deployment Directories

Amezmo creates a new directory under /webroot/release. The directory created is effectively the result of running git pull at the time the deployment was executed. If your deployment succeeds, Amezmo updates the /webroot/current symbolic link to point to the new deployment directory that was created upon the deployment succeeding.

    
        /webroot/release/${TIMESTAMP}.${COMMIT_ID}
    

Directories

The timestamp variable is in the form of YYYY-MM-DDTHH:MM:SS.mmmmmm, and the commit ID is short form version of the SHA1 Git commit hash.

Amezmo maintains an environment directory per environment inside your instance to implement atomic deployments and to separate staging and production. Throughout this documentation, we refer to the "current release directory" as the directory that was created as a result of a succesfull deployment.

    
/webroot
    |----logs
    |----storage
    |----node_modules
    |----vendor
    |----current -> /webroot/release/${TIMESTAMP}.${COMMIT_ID}
    |----release
    |-------${TIMESTAMP}.${COMMIT_ID}
    |-------${TIMESTAMP}.${COMMIT_ID}
    

Successful deployments

All of the following conditions must be met for a deployment to be considered successful

  • The git repository and branch exists and is visible from Amezmo
  • No non-zero exit status codes from any of your hooks. However, the exit statuses of before.pull, after.deploy, and deploy.success will not affect the deployment outcome.

As a final step in the deployment process, the symbolic link located at /webroot/current is atomically updated to point the new release directory.

As part of the deployment process, Amezmo will run a chmod across your target deployment directory. This ensures that any files created from your hooks will have correct and expected permissions. Amezmo ensures the owner/group is www-data:deployer. This allows for expected permissions across all areas of your application.

For directories, the permissions are 2775/drwxrwxr-x, for files the permissions are 0664/-rw-rw--r--.

Failed deployments

For a deployment to enter the Failed state, any of the following conditions must be met:

When a deployment step fails, the process will be aborted. This means that your current release will not be affected by a failed deployment, as Amezmo only updates your symbolic link as a final step in the process.

Need support?

We're always happy to help with either application or infrastructure questions Always feel free to reach out to us on Twitter, or contact support.

Get updates