EXAMPLES

Real apps, verified end-to-end

Laravel to WordPress on OxPHP — each recipe is a self-contained Docker Compose project: Dockerfile, compose file, install commands, and the details that docs written for nginx + PHP-FPM don't cover.

Laravel

The canonical framework-mode application.

PHP
8.5
Routing mode
Framework
Services
MySQL
Install
composer create-project
environment · docker-compose.yml
ENTRY_FILE=index.php
INTERNAL_ADDR=0.0.0.0:9090
ACCESS_LOG=all
Notes

ENTRY_FILE=index.php selects framework mode: public/ becomes the document root, so .env, app/ and vendor/ are never reachable over HTTP.

Container environment overrides .env — Laravel's dotenv loader never overrides real environment variables, so DB_HOST and APP_ENV set in Compose win.

The dev image revalidates OPcache on every request; edits on the bind-mounted src/ apply instantly.

Built on the published image

Every Dockerfile copies the oxphp binary, liboxphp_bridge.so and the SAPI extension from ghcr.io/oxphp/oxphp. The PHP ABI must match: compile your app's extensions against the same php:<X.Y>-zts-alpine.

Routing mode follows the app's shape

One front controller under public/ → framework mode. Several physical entry points → traditional mode. One decision replaces the whole nginx rewrite file.

Security defaults, no config

Dot-path blocking 404s .env and .git/ everywhere; PHP_DENY_PATHS hardens upload dirs in traditional mode; SYMLINK_ALLOW_PATHS allows only deliberate symlink escapes.

Install through the same container

The dev image carries the PHP CLI and Composer: artisan, drush, wp and bin/magento all run via docker compose exec — no separate toolchain.

Your stack isn't on the list?

Any app with a front controller runs in framework mode — start from the Laravel recipe and adjust three variables.