PHPackages                             lleber/cloud-hook-advanced - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. lleber/cloud-hook-advanced

ActiveAcquia-cloudhook[DevOps &amp; Deployment](/categories/devops)

lleber/cloud-hook-advanced
==========================

An advanced rendition of the cloud-hooks repository focused on automated, predictable, and safe code deployments.

019PHP

Since Feb 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/LukeLeber/cloud-hook-advanced)[ Packagist](https://packagist.org/packages/lleber/cloud-hook-advanced)[ RSS](/packages/lleber-cloud-hook-advanced/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

What are Cloud Hooks?
=====================

[](#what-are-cloud-hooks)

For a comprehensive overview of the Cloud Hooks feature, please refer to the canonical source at .

What value does this project add?
=================================

[](#what-value-does-this-project-add)

This project was started in response to a number of pain-points that were encountered with managing enterprise Drupal 8 projects on Acquia Cloud.

It is comprised of a number of hooks that fire in a specific order to help make code deployments faster, more predictable, and less vulnerable to human error.

It was also created because of the lack of ACAPI support for Drush 9.

Prerequisites
-------------

[](#prerequisites)

This project makes certain assumptions about application and organization setup.

### Cloudflare Support Tier

[](#cloudflare-support-tier)

Domain based purging requires an enterprise Cloudflare account.

### Modules

[](#modules)

- Drush &gt;= 9.2.1
- Cloudflare &gt;= 8.x-1.0-alpha7

### Environment Setup

[](#environment-setup)

Before deploying these hooks to an Acquia application, certain steps must be taken to install the proper Acquia and Cloudflare credentials.

#### Setting up ACAPI

[](#setting-up-acapi)

To set up ACAPI on an environment, credentials must be installed on the Acquia server(s) being targeted.

This can be accomplished by either:

- running the `ac-api-login` command with Drush 8.
- Uploading a credentials file at `~/.acquia/cloudapi.conf`.

```
{"email":"account@example.com", "key":"get-the-key-from-the-acquia-dashboard"}
```

#### Configuring Cloudflare API

[](#configuring-cloudflare-api)

The Cloudflare API keys need to be configured within the Drupal database at `/admin/config/services/cloudflare`.

Scripts
-------

[](#scripts)

Each operation is separated into its own script. These scripts are shared among the various environments through carefully named symbolic links.

### Backup Databases

[](#backup-databases)

This script will auto-detect all schemas on the current environment and create user backups of each before exiting.

This script utilizes v1 of the Acquia Cloud REST API to block subsequent hook execution until all backups are completed. By default, it only runs on the production environment.

### Drupal Cache Clear

[](#drupal-cache-clear)

This script clears the local Drupal cache. It adds a layer of safety and consistency by also clearing the Drush cache prior to clearing everything else. This is also said to resolve [acquia/blt#2867](https://github.com/acquia/blt/issues/2867).

### Update Entities

[](#update-entities)

This script simply runs `drush entity:updates`.

### Update Databases

[](#update-databases)

This script simply runs `drush updatedb`.

### Configuration Import

[](#configuration-import)

This script runs a configuration import against the `sync` source. If a configuration split exists for the current environment, then the environment-specific configuration is imported as well.

### Varnish Cache Clear

[](#varnish-cache-clear)

This script will auto-detect all domains on the current environment and purge the Varnish cache for each before exiting.

It utilizes the Acquia Cloud REST APIv1 to perform purge requests and will block subsequent hook execution until all caches are purged (to prevent race conditions with clearing upstream caching layers).

### Cloudflare Cache Clear

[](#cloudflare-cache-clear)

This script will auto-detect all domains on the current environment and purge the Cloudflare cache for each before exiting.

It utilizes the Cloudflare REST APIv4 to perform purge requests and will **NOT** block subsequent hook execution, as this is not supported through the API at this time.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 95% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/03ed4b950dbab3911ee86b44838b0fe49c598ef8ed717ed7be3378a453a1d3a0?d=identicon)[lleber](/maintainers/lleber)

---

Top Contributors

[![lal65](https://avatars.githubusercontent.com/u/105240977?v=4)](https://github.com/lal65 "lal65 (19 commits)")[![LukeLeber](https://avatars.githubusercontent.com/u/3664814?v=4)](https://github.com/LukeLeber "LukeLeber (1 commits)")

### Embed Badge

![Health badge](/badges/lleber-cloud-hook-advanced/health.svg)

```
[![Health](https://phpackages.com/badges/lleber-cloud-hook-advanced/health.svg)](https://phpackages.com/packages/lleber-cloud-hook-advanced)
```

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
