Download the PHP package keyagency/deployer-recipes without Composer

On this page you can find all versions of the php package keyagency/deployer-recipes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package deployer-recipes

keyagency/deployer-recipes

Key Agency's shared Deployer 8 recipes: a base key recipe (Slack notifications + healthcheck) and per-platform wrappers with build and content-sync tasks.

Install

Supported platforms

Each platform has its own section below with everything you need: the require, the tasks and the configuration.

Platform Section Platform docs
Laravel Laravel laravel.com/docs
Statamic Statamic statamic.dev
October CMS October CMS docs.octobercms.com
WordPress (Bedrock) WordPress (Bedrock) roots.io/bedrock/docs

Is your platform not listed? See Adding a platform.

All platforms

Every wrapper loads Deployer's base recipe for that platform plus the shared key recipe. In your project's deploy.php, require the wrapper for your platform and define your host:

The shared key recipe registers on every platform:

It also runs deploy:unlock after deploy:failed, so a failed deploy never leaves the release locked.

To enable Slack notifications, add the webhook to your project's .env (picked up automatically — no webhook means no notifications):

A real environment variable KEY_SLACK_WEBHOOK (e.g. in CI) takes precedence over the .env file, and an explicit set('key_slack_webhook', ...) in deploy.php wins over both.

No webhook URL is bundled in this package. Each project supplies its own, so installing the package never posts to anyone else's Slack.

All custom config keys are prefixed with key_ to avoid collisions with Deployer's own options. The shared recipe also sets a few Deployer defaults: git_tty (true), writable_mode ('skip') and allow_anonymous_stats (false). Override them in your project's deploy.php when needed.

Shared configuration

Key Default Description
key_platform per wrapper (LARAVEL, STATAMIC, OCTOBER CMS, BEDROCK) Label that prefixes task descriptions and log output, e.g. [STATAMIC] Syncing ....
key_slack_webhook KEY_SLACK_WEBHOOK from env/.env, else '' Slack incoming-webhook URL. Empty = notifications disabled.
key_slack_title {{application}} Slack message title.
key_slack_text Deploy of \{{target}}` to {{alias}} on `{{hostname}}`` Slack message body.
key_healthcheck_url '' URL to check after a successful deploy. Empty = disabled.
key_healthcheck_expected_status 200 Expected HTTP status.
key_healthcheck_retries 3 Attempts before the healthcheck fails the deploy.
key_healthcheck_pause 5 Seconds to wait between healthcheck attempts.

How syncing works

Statamic and October CMS ship key:sync:* tasks that rsync content between the server and your machine. They are not wired into the deploy flow; call them directly, e.g. dep key:sync:content production.

Sync configuration

Key Default Description
key_sync_<type> per platform Paths to sync per type; see the platform sections for the available types and defaults. Extend with add() or override with set().
key_sync_excludes [] (October CMS: ['blocks.yaml']) Rsync exclude patterns applied to every sync.
key_sync_backup false Copy the destination dir to <dir>-backup before each sync.

Laravel

Loads Deployer's laravel recipe plus the shared key recipe.

Tasks

Configuration

Key Default Description
key_build_tmp_path <system temp>/deployer-build Base dir for the temporary build worktree.
key_build_command yarn && yarn build Local build command.

Statamic

Loads Deployer's statamic recipe plus the shared key recipe, and shares public/assets and content between releases. The deploy task is overridden to drop statamic:stache:warm; statamic:stache:clear is kept so new content is picked up (the Stache lives in shared storage and the watcher is disabled in production), but the slow warming is skipped and the Stache rebuilds lazily on the next request, which avoids slow deploys on large sites. Make sure the watcher is disabled in production (STATAMIC_STACHE_WATCHER=auto).

Tasks

Configuration

Key Default Description
key_build_tmp_path <system temp>/deployer-build Base dir for the temporary build worktree.
key_build_command yarn && yarn build Local build command.
key_sync_content ['content/', 'resources/users/', 'resources/sites.yaml', 'resources/preferences.yaml'] Paths synced by key:sync:content.
key_sync_assets ['public/assets/'] Paths synced by key:sync:assets.
key_sync_forms ['resources/forms/', 'resources/blueprints/forms/'] Paths synced by key:sync:forms.
key_sync_addons ['resources/addons/'] Paths synced by key:sync:addons.

October CMS

Loads Deployer's laravel recipe (October CMS is built on Laravel) plus the shared key recipe. The deploy task is overridden to run the October CMS migrations (october:migrate) and mirror plugin and module assets into public/ (october:mirror) before publishing, and to write the deployed git revision to .version (system:update).

Tasks

To sync an extra theme, only the theme list needs to change:

Configuration

Key Default Description
key_october_themes ['default'] Themes whose content/ and meta/ are synced by key:sync:theme.
key_sync_theme derived from key_october_themes Paths synced by key:sync:theme. Set the themes before calling add('key_sync_theme', ...).
key_sync_storage ['storage/app/uploads/', 'storage/app/media/'] Paths synced by key:sync:storage.

WordPress (Bedrock)

Loads Deployer's common recipe (with deploy:vendors in the deploy flow, since Bedrock is composer-based) plus the shared key recipe, and shares .env, web/.htaccess and web/app/uploads between releases.

Tasks

Neither task is wired into the deploy flow; call them directly or wire them in your project's deploy.php:

Configuration

Key Default Description
key_bedrock_theme '' Theme folder name; required for key:build:resources.
key_bedrock_theme_path web/app/themes/<key_bedrock_theme> Theme path; override for a non-standard layout.
key_build_command yarn && yarn build Local build command.
key_build_uploads ['assets/js/', 'style.css'] Build artifacts to upload, relative to the theme path. Trailing slash = directory, no slash = single file.
key_languages ['nl_NL'] Languages installed by key:install:languages.

Adding a platform

Create recipe/key/<platform>.php that requires the matching Deployer base recipe and the shared key recipe:

key_platform must be set before requiring key.php, so the task descriptions pick up the [<PLATFORM>] prefix.

Platform-specific features live in per-feature files under recipe/key/<platform>/ (e.g. recipe/key/october/sync.php), required by the wrapper. Sync features build on the shared helpers in recipe/helpers/sync.php: define a key_sync_<type> option per sync type (a flat list of paths) and register tasks that call key_sync_prompt() and key_sync(). Platforms with a Vite build get the key:build:resources task by requiring the shared recipe/helpers/build.php, as the Laravel and Statamic wrappers do.

About Key Agency

Key Agency is a digital agency based in Amsterdam that helps brands grow with strategy, content, technology and advertising working together as one digital ecosystem. Our development team builds and maintains websites and platforms (Laravel, Statamic, October CMS and WordPress) and uses these recipes to deploy them.

Contact

Questions, remarks or suggestions? Reach us at [email protected].


All versions of deployer-recipes with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
deployer/deployer Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package keyagency/deployer-recipes contains the following files

Loading the files please wait ...