PHPackages                             codinglabsau/yolo-alpha - 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. codinglabsau/yolo-alpha

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

codinglabsau/yolo-alpha
=======================

YOLO Alpha — pre-1.0 EC2/ASG deployer for Laravel. Frozen, maintenance-only. See codinglabsau/yolo for the active 1.0 (Fargate) line.

v1.0.0-alpha.34(3w ago)085[1 PRs](https://github.com/codinglabsau/yolo-alpha/pulls)MITPHPPHP ^8.3CI passing

Since May 19Pushed 3w agoCompare

[ Source](https://github.com/codinglabsau/yolo-alpha)[ Packagist](https://packagist.org/packages/codinglabsau/yolo-alpha)[ Docs](https://github.com/codinglabsau/yolo-alpha)[ RSS](/packages/codinglabsau-yolo-alpha/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (14)Versions (3)Used By (0)

 [![YOLO](art/logo.png)](art/logo.png)

 [![Test](https://github.com/codinglabsau/yolo-alpha/actions/workflows/test.yml/badge.svg)](https://github.com/codinglabsau/yolo-alpha/actions/workflows/test.yml) [![Analyse](https://github.com/codinglabsau/yolo-alpha/actions/workflows/analyse.yml/badge.svg)](https://github.com/codinglabsau/yolo-alpha/actions/workflows/analyse.yml) [![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE.md) [![PHP 8.3+](https://camo.githubusercontent.com/278621fc49c71cdc38414030199af0284d7323979cad78496bfafbf7050ee4bc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737374242342e737667)](https://php.net)

Important

**YOLO Alpha is frozen — bug fixes only.** This is the pre-1.0 EC2/ASG deployer extracted from `codinglabsau/yolo` so it can run side-by-side with YOLO 1.0 (Fargate) during the LP cutover window. New work happens on [`codinglabsau/yolo`](https://github.com/codinglabsau/yolo).

YOLO helps you deploy high-availability PHP applications to AWS.

The CLI tool lives inside your Laravel app in `vendor/bin/yolo-alpha`, and takes care of provisioning and configuring all required resources on AWS, coupled with build and deployment commands to deploy applications to production from your local machine or CI pipeline.

YOLO has been battle-tested on apps that serve 2 million requests per day.

Features
--------

[](#features)

### Autoscaling Worker Groups

[](#autoscaling-worker-groups)

YOLO provisions an Application Load Balancer and autoscaling groups (web, queue, scheduler) for each environment.

Each group is self-healing should an instance become unresponsive, and the web group automatically scales up to handle traffic bursts.

In addition, worker groups can be combined (coming soon) to a single EC2 instance to consolidate small workloads.

### Resource Sharing

[](#resource-sharing)

YOLO shares various resources between applications to reduce costs.

### Zero-downtime Deployments

[](#zero-downtime-deployments)

YOLO leverages AWS CodeDeploy to perform zero-downtime deployments, which can be triggered from the CLI or via a CI pipeline.

### Multi-tenancy

[](#multi-tenancy)

Specify tenants in the manifest and YOLO will take care of provisioning resources for each tenant.

### .env Management

[](#env-management)

Manage .env files locally with push and pull commands. Preview changes before deploying.

### S3

[](#s3)

Leverage S3 for storing build artefacts and user data files.

### Octane (experimental)

[](#octane-experimental)

YOLO supports Laravel Octane for turbocharged PHP applications.

### Video Transcoding

[](#video-transcoding)

YOLO can configure your app environment to utilise video transcoding using AWS Elemental MediaConvert.

### Interactive Video Service (IVS)

[](#interactive-video-service-ivs)

AWS IVS is Amazon's managed low-latency live video streaming service. For apps that use IVS, YOLO captures all IVS state-change events to CloudWatch via EventBridge for audit and debugging.

### And Much More...

[](#and-much-more)

- Least priviledge permissions with strong segregation across environments and apps
- Seperate commands that run on deployment across worker groups
- Scheduled MySQL backups using `mysqldump`
- Control of build and deploy commands
- Re-use existing VPCs, subnets, internet gateways and more

---

Disclaimer
----------

[](#disclaimer)

YOLO is designed for PHP developers who are comfortable managing AWS using an infrastructure-as-code approach.

It is, at it's core, a Symfony CLI app that leverages the AWS SDK, rather than CloudFormation / Terraform / K8s / Elastic Beanstalk / .

While YOLO has underpinned very large, mission-critical production applications, it is not intended to be a set and forget solution; rather it acts as a control plane that allows you to manage and expand your AWS footprint over time.

It goes without saying, but use YOLO at your own risk.

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

[](#prerequisites)

You'll need access to an AWS account, and some knowledge of AWS services.

### Domains on Route53

[](#domains-on-route53)

The domains for your app should be added to Route53 on the same AWS account as where the app is hosted in advance.

### Permissions &amp; Authentication

[](#permissions--authentication)

YOLO uses AWS profiles for authentication.

Profiles are stored in `~/.aws/credentials` for authentication. You'll need to set a `YOLO_{ENVIRONMENT}_AWS_PROFILE` in the app `.env` file to point to the correct profile; eg.

```
YOLO_PRODUCTION_AWS_PROFILE=my-project-profile
```

Once configured, future operations will authenticate using this profile.

You will need wide-ranging AWS credentials to provision everything required by YOLO; administrative permissions are recommended.

For CI environments like GitHub Actions, `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are used instead. Ensure that any access keys provided in CI are using least-privileged scope.

Step 1: Installation
--------------------

[](#step-1-installation)

### a) Install With Composer

[](#a-install-with-composer)

```
composer require codinglabsau/yolo-alpha
```

The entry point to the YOLO Alpha CLI is `vendor/bin/yolo-alpha` or `yolo-alpha` if you have `./vendor/bin` in your path.

Run `yolo-alpha` to see the available commands.

### b) Initialise yolo-alpha

[](#b-initialise-yolo-alpha)

Next, run `yolo-alpha init`. The init command does the following:

1. initialises the yolo.yml file in the app with a boilerplate production environment
2. adds some entries to `.gitignore`
3. prompts for a few bits of information to setup the manifest file

After initialising, you can customise the `yolo.yml` manifest file to suit your app's requirements.

Step 2: Provision resources
---------------------------

[](#step-2-provision-resources)

YOLO is designed to create and manage all AWS resources required to run your application.

Provision all resources by running `yolo-alpha sync `. This command runs all `sync` commands in the correct order.

The full list of available sync commands are:

- `yolo-alpha sync:network ` prepares the VPC, subnets, security groups and SSH keys
- `yolo-alpha sync:standalone ` prepares standalone app resources (standalone apps only)
- `yolo-alpha sync:landlord ` prepares landlord resources (multitenancy apps only)
- `yolo-alpha sync:tenant ` prepares tenant resources (multitenancy apps only)
- `yolo-alpha sync:compute ` prepares the compute resources
- `yolo-alpha sync:ci ` prepares the continuous integration pipeline
- `yolo-alpha sync:iam ` prepares necessary permissions
- `yolo-alpha sync:logging ` prepares observability infrastructure (e.g. IVS state-change events)

Tip

All sync commands support a `--dry-run` argument; this is a great starting point to see what resources will be created or modified without any actual changes occurring on AWS.

Step 3: Prepare a server image
------------------------------

[](#step-3-prepare-a-server-image)

With all the low-level resource provisioned via the `sync` commands, the next step is to create an Amazon Machine Image ( AMI) with Ubuntu OS as the foundation.

The image will be used as the initial disk image for all server instances, and can be updated over time to bring in improvements, such as new PHP versions.

### a) Create an image

[](#a-create-an-image)

Run `yolo-alpha image:create ` to generate a new AMI.

### b) Prepare the image for traffic

[](#b-prepare-the-image-for-traffic)

To prepare a new stage, run `yolo-alpha stage `.

This interactive command walks you through updating or replacing the current stage configuration.

New stages have the benefit of allowing testing before migrating production workloads over, however simply updating the existing stage is recommended for minor changes.

SituationRecommended strategyUpdate EC2 security groupupdateUpdate EC2 typeupdateUpdate EC2 instance profileupdateUpdate AMIcreateWhen creating a new stage, the yolo.yml manifest will also be updated to point to the new autoscaling groups on the next deployment.

Note

Rotating in a new image does not have any impact on existing traffic until the updated manifest is deployed - the previous deployment will continue serving requests and autoscaling as per normal.

Step 4. Setup .env file
-----------------------

[](#step-4-setup-env-file)

You'll need to push the initial .env file for the environment. Environment files are stored in the S3 artefacts bucket, and retrieved during deployment.

If you have an existing .env file, be sure to copy that over to `.env.` in the root of the app, otherwise you can build on the stub provided by the `init` command.

To push the .env file to the artefacts bucket, run `yolo-alpha env:push `.

After the initial push, you can retrieve the .env file with `yolo-alpha env:pull `.

Step 5. Building and deploying
------------------------------

[](#step-5-building-and-deploying)

Builds can be created with `yolo-alpha build `.

The build command takes care of building a deployment-ready directory in `./yolo`.

Builds can be deployed with `yolo-alpha deploy `.

Tip

You can also build and deploy in a single command with `yolo-alpha deploy `.

yolo.yml
--------

[](#yoloyml)

This is a complete yolo.yml manifest file, showing default values where applicable.

Note that some keys below are intentionally omitted from the stub generated by `yolo-alpha init`.

```
name: codinglabs
timezone: UTC

environments:
  production:
    aws:
      account-id:
      region: ap-southeast-2
      vpc:
      internet-gateway:
      public-subnets:
      route-table:
      bucket:
      artefacts-bucket:
      cloudfront:
      alb:
      mediaconvert: false
      ivs: false
      autoscaling:
        web:
        queue:
        scheduler:
        combine: false
      ec2:
        instance-type: t3.small
        queue-instance-type:
        scheduler-instance-type:
        octane: false
        nightwatch: false
        key-pair:
        security-group:
      rds:
        subnet:
        security-group:
      codedeploy:
        strategy: without-load-balancing|with-load-balancing
      sqs:
        depth-alarm-evaluation-periods: 3
        depth-alarm-period: 300
        depth-alarm-threshold: 100

    asset-url: # defaults to aws.cloudfront
    mysqldump: false

    domain: example.com # standalone apps only
    apex: # standalone apps only

    tenants: # multi-tenanted apps only
      boating: # unique key for the tenant
        domain: boating-with-yolo.com

      fishing: # unique key for the tenant
        domain: fishing-with-yolo.com

    build:
      - composer install --no-cache --no-interaction --optimize-autoloader --no-progress --classmap-authoritative --no-dev
      - npm ci
      - npm run build
      - rm -rf package-lock.json resources/js resources/css node_modules database/seeders database/factories resources/seeding

    deploy: #runs on scheduler
      - php artisan migrate --force

    deploy-queue: # runs on queue
      -

    deploy-web: # runs on web
      -

    deploy-all: # runs on all instances
      - php artisan optimize
```

### Continuous Integration

[](#continuous-integration)

The app version can be specified as an option with `--app-version` to the `build` and `deploy` commands.

The recommended approach is to tag your GitHub releases with a date-based naming convention, and then forward the tag to your deploy action, similar to the following:

```
- name: Deploy
    run: php vendor/bin/yolo-alpha deploy production --app-version=${{ github.event.release.tag_name }}
    env:
      AWS_ACCESS_KEY_ID: ${{ secrets.PRODUCTION_AWS_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.PRODUCTION_AWS_SECRET_ACCESS_KEY }}
```

The current app version must start with `year.week`, for example `25.3` to represent the third week of 2025. After the year and week, use whatever convention you like; a common approach is to increment the third digit for each release, for example `25.3.1`, `25.3.2`, etc.

Because the app version is validated during the build and utilises the UTC timezone by default, you may wish to set the manifest `timezone` option to the timezone of your team to prevent validation errors at the start of the week if your timezone is ahead of UTC.

### Domains

[](#domains)

Applications hosted with yolo-alpha can be served on any domain or subdomain that you own.

The domain should be added to Route53 in advance.

For a standalone application, the domain key can be used:

```
    domain: codinglabs.com.au
```

In this example, the app will be served on `codinglabs.com.au`, and `www.codinglabs.com.au` will redirect to `codinglabs.com.au`.

If the application is served on any subdomain (including [www](http://www).) you'll need to specify the apex record as well.

```
    apex: codinglabs.com.au
    domain: www.codinglabs.com.au
```

In this example, the app will be served on `www.codinglabs.com.au`, and `codinglabs.com.au` will redirect to `www.codinglabs.com.au`.

Multi-tenant applications follow the same logic, except that domains are configured under the `tenants` key.

```
    tenants:
      boating:
        domain: boating.outdoors-with-yolo.com
        apex: outdoors-with-yolo.com

      camping:
        domain: camping.outdoors-with-yolo.com
        apex: outdoors-with-yolo.com

      fishing:
        domain: fishing-with-yolo.com
```

Development
-----------

[](#development)

To debug or add features to YOLO, it is recommended to symlink to the local repository.

Add this to composer.json with the path to the local repository:

```
"repositories": [
    {
    "type": "path",
    "url": "/Users/username/code/yolo-alpha"
    }
],

```

To call yolo-alpha from the app you are debugging, you'll need to tell yolo-alpha the path to the app. Set the `YOLO_BASE_PATH`environment to the root of the app as follows:

```
YOLO_BASE_PATH=$(pwd) yolo-alpha
```

Credits
-------

[](#credits)

- [Steve Thomas](https://github.com/stevethomas)
- [All Contributors](https://github.com/codinglabsau/yolo-alpha/contributors)

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance95

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

22d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1127412?v=4)[Steve Thomas](/maintainers/stevethomas)[@stevethomas](https://github.com/stevethomas)

---

Top Contributors

[![stevethomas](https://avatars.githubusercontent.com/u/1127412?v=4)](https://github.com/stevethomas "stevethomas (3 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/codinglabsau-yolo-alpha/health.svg)

```
[![Health](https://phpackages.com/badges/codinglabsau-yolo-alpha/health.svg)](https://phpackages.com/packages/codinglabsau-yolo-alpha)
```

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k449.3k30](/packages/tightenco-jigsaw)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)[flarum/core

Delightfully simple forum software.

261.4M2.2k](/packages/flarum-core)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)

PHPackages © 2026

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