feat: migrate containers to FrankenPHP + Laravel Octane#1154
Open
Romerolweb wants to merge 3 commits intoHiEventsDev:developfrom
Open
feat: migrate containers to FrankenPHP + Laravel Octane#1154Romerolweb wants to merge 3 commits intoHiEventsDev:developfrom
Romerolweb wants to merge 3 commits intoHiEventsDev:developfrom
Conversation
- Replace serversideup/php (PHP-FPM + nginx) with dunglas/frankenphp:php8.3-alpine in Dockerfile.all-in-one, backend/Dockerfile, and backend/Dockerfile.dev - Add laravel/octane and publish config/octane.php for FrankenPHP worker mode - Replace nginx.conf with a Caddyfile (FrankenPHP embeds Caddy) - Replace old supervisor configs with a new supervisord.conf for the Octane worker - Fix missing /api prefix in RouteServiceProvider — Octane strips the group prefix - Add build-time VITE_* ARGs to Dockerfile.all-in-one for configurable bundles - Remove the standalone nginx sidecar from docker-compose.dev.yml - Update AIO docker-compose.yml port from 8123:80 to 8000:8000 and add OCTANE_SERVER - Update README quick-start URL to new port 8000
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
…t paths Remove apk add php83-* lines — those install system PHP packages which conflict with FrankenPHP's embedded PHP. Only install-php-extensions (mlocati/docker-php-extension-installer) is correct for the embedded PHP. Also reorder layers for better cache efficiency: install extensions before COPY so app code changes don't invalidate the extension layer. Add mkdir -p storage before chmod for safety when building from a clean checkout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes I've made
serversideup/php(PHP-FPM + nginx) base images withdunglas/frankenphp:php8.3-alpinein
Dockerfile.all-in-one,backend/Dockerfile, andbackend/Dockerfile.devlaravel/octanedependency and publishedconfig/octane.phpconfigured for FrankenPHPworker mode
docker/all-in-one/nginx/nginx.confwith aCaddyfile— FrankenPHP embeds Caddy soa separate nginx process is no longer needed
supervisor/supervisord.conf(nginx + PHP-FPM entries) with a newsupervisord.confthat starts the Octane worker and the Laravel queue worker/apiroute prefix inRouteServiceProvider— Laravel Octane strips the prefixapplied at the
Route::middleware('api')group level; adding->prefix('api')explicitlyrestores correct routing
VITE_*ARGs toDockerfile.all-in-oneso the frontend bundle can beconfigured at image build time (needed for custom deployments where the API URL differs from
the default)
docker-compose.dev.yml— FrankenPHP serves HTTPdirectly, making the extra reverse-proxy container unnecessary
docker/all-in-one/docker-compose.yml: port8123:80→8000:8000, addedOCTANE_SERVER=frankenphp,APP_ENV/APP_DEBUGdefaults, andQUEUE_CONNECTIONdefaultdocker/all-in-one/README.mdquick-start URL to the new portWhy I've made these changes
FrankenPHP with Laravel Octane keeps the Laravel application bootstrapped in memory between
requests, eliminating per-request boot overhead. This meaningfully improves throughput for
event/ticket operations. FrankenPHP also embeds Caddy, which simplifies the all-in-one container
by removing the nginx process and its associated configuration.
How I've tested these changes
backend/Dockerfileon ARM64 and verified it starts correctlydelivery
Checklist