PHPackages                             mittwald/deployer-recipes - 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. mittwald/deployer-recipes

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

mittwald/deployer-recipes
=========================

A collection of Deployer recipies for easily deploying your applications onto the mittwald platform

v1.0.1(1y ago)43.8k↓40.9%[6 PRs](https://github.com/mittwald/deployer-recipes/pulls)MITPHPPHP ^8.2CI passing

Since Oct 9Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/mittwald/deployer-recipes)[ Packagist](https://packagist.org/packages/mittwald/deployer-recipes)[ RSS](/packages/mittwald-deployer-recipes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (37)Used By (0)

mittwald Deployer Recipe Collection
===================================

[](#mittwald-deployer-recipe-collection)

 [⚒️ Installation instructions](#installation) | [🙆 Usage](#usage) | [⚙️ Configuration options](#configuration-options) | [📖 Documentation](https://developer.mittwald.de/docs/v2/technologies/deployment/deployer/)

---

Important

This library is currently in an beta state. We welcome any feedback and contributions.

This repository contains a set of mittwald-specific helper functions and recipes for [Deployer](https://deployer.org/).

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

In order to use this recipe collection, you need to install it via [Composer](https://getcomposer.org):

```
composer require --dev mittwald/deployer-recipes
```

### Using Docker

[](#using-docker)

There is also a pre-built docker image, providing both deployer and the mittwald deployer recipes. You can use it like this:

```
docker run --rm -it -v $(pwd):/app -w /app mittwald/deployer:latest deploy
```

Usage
-----

[](#usage)

Note

Find configuration examples for common CI/CD tools like Github Actions and Gitlab CI at the bottom of this document.

This recipe needs a [mittwald API token](https://developer.mittwald.de/docs/v2/api/intro/) to work. It can be either provided via the `MITTWALD_API_TOKEN` environment variable, or by setting the `mittwald_token` value in your Deployer configuration.

```
$ export MITTWALD_API_TOKEN=...

```

In order to use the recipes provided by this library, you need to include them in your `deploy.php` file:

```
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/vendor/mittwald/deployer-recipes/recipes/deploy.php';
```

To enable the automatic deployment for a host, set the `mittwald_app_id` variable to the ID of the mittwald application you want to deploy to (the ID may either be the full UUID of the application, or the short ID that is displayed in the UI or CLI). In this case, the hostname becomes irrelevant, as the recipe will automatically determine the correct hostname for the SSH connection:

```
host('mittwald')
    ->set('public_path', '/')
    ->set('mittwald_app_id', '')
    ->set('mittwald_app_dependencies', [
        'php'      => '{{php_version}}',
        'gm'       => '*',
        'composer' => '*',
    ]);
```

Alternatively, you can also use the `mittwald_app` shorthand function for the same effect:

```
mittwald_app('')
    ->set('public_path', '/')
    ->set('mittwald_app_dependencies', [
        'php'      => '{{php_version}}',
        'gm'       => '*',
        'composer' => '*',
    ]);
```

What does it do?
----------------

[](#what-does-it-do)

This recipe automates the provisioning of PHP applications on the mittwald cloud platform. You will only need to provide the recipe with the ID of the mittwald application you want to deploy to, and the recipe will take care of the rest by automatically determining the correct deployment path, database credentials, and so on.

More precisely, the recipe will:

- Look up the deployment directory for the given application ID and set it as the `deploy_path` for deployer.
- Correctly configure a virtual host for the domain configured in `domain`
- Look up the necessary SSH connection data, create and manage an SSH user for the deployment, and configure the deployer host accordingly.
- Make sure that the app's system environment matches the one configured in `mittwald_app_dependencies`

Configuration options
---------------------

[](#configuration-options)

- `mittwald_app_id`: The ID of the mittwald application you want to deploy to. This is the only required option, and should be set per host.
- `mittwald_app_dependencies`: A map of system dependencies that should be installed on the mittwald application. The recipe will make sure that the app's system environment matches the one configured here.

    The expected format is a map, using system package names as keys and semver compatible version constraints as values.

    Defaults to `["php" => "{{php_version}}", "composer" => "*"]`.
- `mittwald_domains` may be used to override the domains that should be configured. Defaults to `["{{domain}}"]`.
- `mittwald_domain_path_prefix` can be used to configure a prefix for the domain path. Defaults to `"/"`.
- `mittwald_ssh_public_key` and `mittwald_ssh_private_key` may contain an SSH public/private key pair that should be used for deployment. If not set, the `ssh_copy_id` variable will be used.

Documentation &amp; How-Tos
---------------------------

[](#documentation--how-tos)

For more information on how to use this recipe, please refer to the [documentation](https://developer.mittwald.de/docs/v2/technologies/deployment/deployer/).

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance71

Regular maintenance activity

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~99 days

Total

14

Last Release

368d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f0cf4eb3d44bff50a8f8dd5a05062c98edaf6d078f16cfae2f41caeb1a5e72a?d=identicon)[mittwald-typo3](/maintainers/mittwald-typo3)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (260 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (201 commits)")[![martin-helmich](https://avatars.githubusercontent.com/u/2538958?v=4)](https://github.com/martin-helmich "martin-helmich (193 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (5 commits)")

---

Tags

deployer-recipehacktoberfestphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mittwald-deployer-recipes/health.svg)

```
[![Health](https://phpackages.com/badges/mittwald-deployer-recipes/health.svg)](https://phpackages.com/packages/mittwald-deployer-recipes)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[banago/phploy

PHPloy - Incremental Git (S)FTP deployment tool that supports submodules, multiple servers and rollbacks.

1.4k47.2k](/packages/banago-phploy)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[sarfraznawaz2005/servermonitor

Laravel package to periodically monitor the health of your server and website.

19513.2k1](/packages/sarfraznawaz2005-servermonitor)

PHPackages © 2026

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