From 3648e9157ab2b248b25dd056d7aefada7d24fba0 Mon Sep 17 00:00:00 2001 From: mscherer Date: Wed, 28 Jan 2026 08:48:31 +0100 Subject: [PATCH] Fix FrankenPHP Docker example and add local dev tip - Replace WORKDIR with SERVER_ROOT env var to correctly set FrankenPHP's document root to /app/webroot (default is /app/public) - Fix composer install running in wrong directory (webroot/ instead of /app) - Add tip about bin/cake server --frankenphp for local development --- docs/en/installation.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/en/installation.md b/docs/en/installation.md index a756648c21..4219ac89c8 100644 --- a/docs/en/installation.md +++ b/docs/en/installation.md @@ -386,10 +386,11 @@ FROM dunglas/frankenphp # Copy your CakePHP application COPY . /app -# Set working directory -WORKDIR /app/webroot +# FrankenPHP defaults to /app/public as document root. +# CakePHP uses webroot/ instead, so override it: +ENV SERVER_ROOT=/app/webroot -# Install dependencies if needed +# Install dependencies (composer.json lives in /app) RUN composer install --no-dev --optimize-autoloader # Build and run: @@ -422,6 +423,14 @@ myapp.local { ::: +::: tip Local Development +For local development, you can use the built-in CakePHP development server with FrankenPHP support: +```bash +bin/cake server --frankenphp +``` +This requires the `frankenphp` binary to be available in your `PATH`. +::: + ::: info Why FrankenPHP? FrankenPHP combines PHP with Caddy, providing automatic HTTPS, HTTP/3, and modern compression without needing PHP-FPM. Particularly efficient for containerized deployments. :::