Skip to content

feat: migrate containers to FrankenPHP + Laravel Octane#1154

Open
Romerolweb wants to merge 3 commits intoHiEventsDev:developfrom
Romerolweb:feature/frankenphp-octane
Open

feat: migrate containers to FrankenPHP + Laravel Octane#1154
Romerolweb wants to merge 3 commits intoHiEventsDev:developfrom
Romerolweb:feature/frankenphp-octane

Conversation

@Romerolweb
Copy link
Copy Markdown
Contributor

@Romerolweb Romerolweb commented Apr 9, 2026

What changes I've made

  • Replaced serversideup/php (PHP-FPM + nginx) base images with dunglas/frankenphp:php8.3-alpine
    in Dockerfile.all-in-one, backend/Dockerfile, and backend/Dockerfile.dev
  • Added laravel/octane dependency and published config/octane.php configured for FrankenPHP
    worker mode
  • Replaced docker/all-in-one/nginx/nginx.conf with a Caddyfile — FrankenPHP embeds Caddy so
    a separate nginx process is no longer needed
  • Replaced the old supervisor/supervisord.conf (nginx + PHP-FPM entries) with a new
    supervisord.conf that starts the Octane worker and the Laravel queue worker
  • Fixed the /api route prefix in RouteServiceProvider — Laravel Octane strips the prefix
    applied at the Route::middleware('api') group level; adding ->prefix('api') explicitly
    restores correct routing
  • Added build-time VITE_* ARGs to Dockerfile.all-in-one so the frontend bundle can be
    configured at image build time (needed for custom deployments where the API URL differs from
    the default)
  • Removed the standalone nginx sidecar from docker-compose.dev.yml — FrankenPHP serves HTTP
    directly, making the extra reverse-proxy container unnecessary
  • Updated docker/all-in-one/docker-compose.yml: port 8123:808000:8000, added
    OCTANE_SERVER=frankenphp, APP_ENV/APP_DEBUG defaults, and QUEUE_CONNECTION default
  • Updated docker/all-in-one/README.md quick-start URL to the new port

Why 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

  • Built the all-in-one Docker image locally on Apple Silicon (ARM64)
  • Built the standalone backend/Dockerfile on ARM64 and verified it starts correctly
  • Tested end-to-end flows: user registration, login, event creation, ticket checkout, and webhook
    delivery
  • Ran the existing PHPUnit test suite — all tests pass

Checklist

  • I have read the contributing guidelines.
  • My code follows the coding standards of the project.
  • I have tested my changes, and they work as expected.
  • I understand that this PR will be closed if I do not follow the contributor guidelines and if this PR template is left unedited.

- 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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Romerolweb
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Romerolweb Romerolweb changed the title Feature/frankenphp octane feat: migrate containers to FrankenPHP + Laravel Octane Apr 9, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant