Skip to content

Fix FrankenPHP Docker example and add local dev tip#8177

Merged
josbeir merged 1 commit into5.xfrom
fix-frankenphp-docker-docs
Jan 28, 2026
Merged

Fix FrankenPHP Docker example and add local dev tip#8177
josbeir merged 1 commit into5.xfrom
fix-frankenphp-docker-docs

Conversation

@dereuromark
Copy link
Member

Summary

  • Replace WORKDIR /app/webroot with ENV SERVER_ROOT=/app/webroot in the Dockerfile example. FrankenPHP's default document root is /app/public, and WORKDIR only changes the working directory for subsequent Docker commands — it does not change the server's document root. CakePHP uses webroot/ instead of public/, so the SERVER_ROOT environment variable is needed.
  • Fix composer install which previously ran in webroot/ (due to WORKDIR) but needs to run in /app where composer.json lives. Removing WORKDIR fixes this since the default is /app.
  • Add a tip about bin/cake server --frankenphp for local development (available since CakePHP 5.3).

- 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
@dereuromark dereuromark marked this pull request as ready for review January 28, 2026 12:14
@josbeir josbeir merged commit 9bf66f4 into 5.x Jan 28, 2026
4 checks passed
@josbeir josbeir deleted the fix-frankenphp-docker-docs branch January 28, 2026 12:37
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.

2 participants