foxws / laravel-podman
Podman Quadlet support to your Laravel application
Fund package maintenance!
Requires
- php: ^8.4
- composer-runtime-api: ^2.0
- illuminate/console: ^11.0|^12.0|^13.0
- illuminate/contracts: ^11.0||^12.0||^13.0
- illuminate/filesystem: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- spatie/laravel-package-tools: ^1.16
- symfony/console: ^6.0|^7.0|^8.0
Requires (Dev)
- aws/aws-sdk-php: ^3.322
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^11.0.0||^10.0.0||^9.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
Suggests
- aws/aws-sdk-php: Required to use the "podman:s3-setup" command (^3.322).
README
Renders Podman Quadlet units from your Laravel app's config, then installs them as systemd-managed containers on your host — no all-in-one runtime, no lock-in. Swap any bundled part (Caddy for Nginx, Postgres for MySQL) for your own.
See docs/ for the full reference: Commands, Customizing, Proxy, S3 Buckets, lpod CLI, Setting up without PHP, Comparison, CI: Building a Container Image.
Requirements
- Linux with systemd (rootless or system-wide) — macOS, Windows, and WSL are not supported
- Podman with the
quadletCLI plugin (podman quadlet --helpshould work)
Installation
composer require foxws/laravel-podman --dev
php artisan vendor:publish --tag="podman-config"
Only needed to render Quadlet units — install as a dev dependency and skip it in production. See Customizing for every config key.
Presets
| Preset | What it is |
|---|---|
development |
App + services, working copy live-mounted for local editing. Enabled by default. |
frankenphp-octane |
Production-style image, app code baked in. Commented out by default. |
devcontainer |
VS Code/JetBrains Dev Containers image. Enabled by default. |
proxy |
Caddy reverse proxy in front of the other services. |
s3 |
CORS policy for S3-compatible storage buckets. |
Custom presets: publish one (php artisan podman:publish frankenphp-octane) without touching the others — see Customizing.
Quick start
-
Render the default presets:
php artisan podman:setup
-
Install
lpodonce per host — a dependency-free script, no PHP/Composer needed:curl -fsSL -o ~/.local/bin/lpod https://github.com/foxws/lpod/releases/latest/download/lpod chmod +x ~/.local/bin/lpod
-
Install each rendered service (the only step that needs
podmanitself):lpod install development/app.quadlets --replace lpod install development/pgsql.quadlets --replace lpod install development/valkey.quadlets --replace lpod install proxy/proxy.quadlets --replace
-
Set secrets, then start:
lpod my-app secrets lpod pgsql secrets lpod my-app up lpod my-app open
Trust the proxy's local certificate once — see Proxy.
No PHP on the host? lpod setup renders the same way without it — see Setting up without PHP.
Commands reference
| Command | Description |
|---|---|
podman:setup |
Generate the default set of presets in one go |
podman:publish PRESET |
Publish a preset for customization |
podman:generate PRESET |
Render a single preset |
podman:s3-setup |
Create S3 buckets and a CORS policy (requires aws/aws-sdk-php) |
Installing, listing, removing, and setting secrets is lpod's job, not Artisan's. Full flag reference: Commands.
Warning:
lpod remove/lpod uninstalldelete the Podman volumes they own (databases, uploads, search indexes), with no undo — see Backing up volumes.
The lpod utility
lpod is a separate, dependency-free bash script — no PHP, Composer, or this package required to run it:
curl -fsSL -o ~/.local/bin/lpod https://github.com/foxws/lpod/releases/latest/download/lpod chmod +x ~/.local/bin/lpod
lpod SERVICE COMMAND [options] [arguments] lpod my-app up lpod my-app artisan queue:work lpod my-app shell lpod install development/app.quadlets --replace lpod my-app secrets
This package ships one Composer binary, vendor/bin/lpod-setup, which renders presets inside a disposable container for hosts with Podman but no PHP. lpod setup is a shortcut for it — copy bin/lpod-setup next to wherever lpod lives on your PATH.
Full command reference, shortening the call, and tips & tricks: foxws/lpod.
Testing
composer test
Links
- CHANGELOG
- Security policy
- foxws/lpod — the CLI this package pairs with
- Podman Quadlet reference
Credits
AI, specifically Claude, was used to help build this package. All AI-assisted output is reviewed by me, and I retain final say over everything that is implemented and released.
License
MIT. See License File.