PHPackages                             soisy/codedeployer - 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. soisy/codedeployer

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

soisy/codedeployer
==================

Deploy tool interacting with AWS Codedeploy

v1.0.15(4y ago)055.2k↓100%MITPHPPHP &gt;=7.0

Since Aug 27Pushed 4y agoCompare

[ Source](https://github.com/compass-direzioneit-dev/codedeployer)[ Packagist](https://packagist.org/packages/soisy/codedeployer)[ RSS](/packages/soisy-codedeployer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (18)Used By (0)

Description
-----------

[](#description)

Codedeployer is a small library that helps deploying any application or codebase to groups of ec2 instances through AWS Codedeploy. The deploy process needs pre-configuration on the AWS side, so ask your nearest ops.

The deployment works like this:

- an archive is created containing the codebase and a special `appspec.yml` file needed by Codedeploy
- this archive is uploaded to S3
- a series of calls is made to the Codedeploy API to initiate deployments
- an agent installed on all supported instances polls Codedeploy waiting for deployment instructions
- when the agent receives a deployment instruction, it downloads the archive from S3 and executes the steps defined in the `appspec.yml` file

This process shifts the deployment from a push system like Idephix or Deployer that requires ssh access to machines in order to rsync the code, to a poll system where the instances are notified of a new deployment request by the agent and download the application archive, running all the configured scripts to complete the deployment.

Components
----------

[](#components)

Things that run on the deployer machine (dev or CI):

- `bin/deploy` script: sets up autoload and executes the main PHP script
- `Codedeployer` PHP class: executed on the dev or CI machine, sets up the archive, pushes it to S3 and calls Codedeploy APIs to initiate deployments
- `config/config.php`: configuration file containing the name of the application and the instance groups target of the deployment, used by the `Codedeployer` class

Things that run on the target machine (ec2 instance where the code is deployed)

- `config/appspec.yml`: configuration file required by AWS Codedeploy, is included in the archive and describes what to do during the deployment on the target machines
- `config/hook-scripts/hook-wrapper.sh`: wrapper script called by `appspec.yml`, is executed on the destination ec2 machines, calls deployments scripts and provides logging; requires the `ts` tool for timestamping
- `config/hook-scripts/instance-template`: template directory containing premade scripts
- `config/hook-scripts/strategies`: scripts that execute predefined deploy strategies: rotating releases and simple copy
- `config/hook-scripts/rsync_exclude`: list of files and directories excluded from the final copy

Installation and usage
----------------------

[](#installation-and-usage)

1. Run `composer require soisy/codedeployer`
2. Run `./vendor/bin/deploy --setup`
3. Create directories named as deployment groups
4. Add scripts inside deployment groups directories
5. Compile `config.php`
6. Run `./vendor/bin/deploy`

**Point 1** and **2** are self explanatory.

**Point 3** requires you to create a directory under `deploy/hook-script` for each instance group you want to deploy to. You should duplicate the `instance-template` directory, change its name to the match the deployment group and adjust its content.

For example, if you wish to deploy to `ec2-alfa` and `ec2-beta` instance groups, the tree will look like this:

```
deploy/
└── hook-scripts/
    ├── ec2-alfa/
    └── ec2-beta/

```

**Point 4** requires you to populate the directories from point 3. AWS Codedeploy offers various hooks during the process, for simplicity the default setup only uses `AfterInstall` but other hooks can be easily added to `appspec.yml` if needed.

`AfterInstall` is the first hook available and is run after the agent has downloaded and extracted the revision archive to a temporary directory; it is used to actually copy all the code to the real target directory and execute any post-install script that might be needed (ie. clearing cache, recreating snapshots, etc).

For more information on AWS Codedeploy hooks see:

Now add scripts in those directories named after these hooks, so assuming you go for the easy version with just `AfterInstall`, your tree should look like this:

```
deploy/
└── hook-scripts/
    ├── ec2-alfa/
    │   └── AfterInstall.sh
    └── ec2-beta/
        └── AfterInstall.sh

```

these scripts will be run by the wrapper script `hook-wrapper.sh` which is defined as the main hook in `appspec.yml`

**Point 5** only requires you to compile a few application related options, the file should be self explanatory.

TODO
----

[](#todo)

- refactor config.php with some other form of configuration
- write Codedeploy new activation (app + groups) through CLI skipping web console
- sanity checks

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 76.7% 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.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~124 days

Total

16

Last Release

1657d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97d09967362d10fc985e9d1c9246352894bca054ff1ebad918e30acadd43dc25?d=identicon)[mriva](/maintainers/mriva)

---

Top Contributors

[![mriva](https://avatars.githubusercontent.com/u/899235?v=4)](https://github.com/mriva "mriva (23 commits)")[![progress44](https://avatars.githubusercontent.com/u/872842?v=4)](https://github.com/progress44 "progress44 (6 commits)")[![enricopesce](https://avatars.githubusercontent.com/u/2789957?v=4)](https://github.com/enricopesce "enricopesce (1 commits)")

---

Tags

awsdeploycodedeploysoisy

### Embed Badge

![Health badge](/badges/soisy-codedeployer/health.svg)

```
[![Health](https://phpackages.com/badges/soisy-codedeployer/health.svg)](https://phpackages.com/packages/soisy-codedeployer)
```

###  Alternatives

[ondram/ci-detector

Detect continuous integration environment and provide unified access to properties of current build

22249.4M33](/packages/ondram-ci-detector)[banago/phploy

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

1.4k47.2k](/packages/banago-phploy)[easycorp/easy-deploy-bundle

The easiest way to deploy Symfony applications

468310.2k](/packages/easycorp-easy-deploy-bundle)[jalogut/magento2-deployer-plus

Magento 2 deployment tool based on deployer.org

201415.5k](/packages/jalogut-magento2-deployer-plus)[techpivot/aws-code-deploy

AWS Code Deploy Bash Runner

124126.9k](/packages/techpivot-aws-code-deploy)[leroy-merlin-br/dployer

A simple script to deploy PHP applications to AWS ElasticBeanstalk

132.8k](/packages/leroy-merlin-br-dployer)

PHPackages © 2026

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