Skip to content

liraui/deployer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deployer

Making Production and Local development environment for Laravel apps using FrankenPHP + Laravel Octane easy. Zero configuration required.

⚠️ Beta: This project is in BETA — APIs, file layout, and packages may change. Use for prototyping and early development. Report bugs or breaking changes in issues, please.

What this package provides

  • A lira CLI wrapper with grouped commands for shared services, app containers, shell access, tooling, and network
  • A multi-stage Docker build: Composer vendor and a FrankenPHP + PHP 8.4 runtime
  • Three container roles out of the box — web, worker, and scheduler — controlled by CONTAINER_MODE
  • Shared services stack (MySQL, Redis, Mailpit, Caddy) — run once per machine, shared across all projects
  • Publishable docker/ directory for full local customisation without losing upstream updates
  • Local HTTPS via a shared Caddy reverse proxy with a one-command OS trust store installer
  • /etc/hosts management for custom local domains
  • A health command showing service status, site reachability, and recent logs

Quick start

Install the package with Composer:

composer require laravel/octane

composer require liraui/deployer

Add to your .env:

OCTANE_SERVER=frankenphp
APP_DOMAIN=myproject.local

Add the shell alias to your ~/.zshrc or ~/.bashrc:

alias lira='sh $([ -f lira ] && echo lira || echo vendor/bin/lira)'

Start shared services (once per machine):

lira services start

Start the app:

lira app start

For full installation instructions and documentation, visit the Installation guide.

Commands

Shared Services  (run once per machine — shared across all projects)
  services start              Start shared MySQL, Redis, Mailpit, Caddy
  services down               Stop shared services
  services restart            Stop and restart shared services
  services health             Show shared service health
  services remove             Stop and delete all shared service data
  services env                Print .env connection variables

App
  app start                   Start app containers
  app restart                 Rebuild and restart app containers
  app stop [-v] [--rmi]       Stop containers; -v removes volumes, --rmi removes images
  app health                  Show service status, site reachability, and recent logs
  app remove                  Stop containers and remove locally-built images
  app publish [--force]       Copy Docker files to docker/ for local customisation

Shell
  shell                       Open an interactive shell (/bin/sh)
  tinker                      Open a Laravel Tinker REPL

Tooling
  artisan <args...>           Run php artisan in the app container
  composer <args...>          Run composer in the app container
  npm <args...>               Run npm on the host
  npx <args...>               Run npx on the host

Network
  dns <add|remove|status>     Manage /etc/hosts for APP_DOMAIN
  trust-ca                    Trust the shared Caddy CA (run once per machine)
  untrust-ca                  Remove the shared Caddy CA from the OS trust store

Contributing

Bug reports and contributions are welcome — please open an issue or a pull request. Maintain a short description of breaking changes.

License

The deployer package is open-sourced licensed under the MIT license.

About

Making Production and Local development environment for Laravel apps using FrankenPHP + Laravel Octane easy. Zero configuration required.

Resources

Stars

Watchers

Forks

Contributors