Skip to content

Conversation

@jaydrogers
Copy link
Member

@jaydrogers jaydrogers commented Feb 8, 2024

4.0 Release: Say hello to FrankenPHP 👋

🚀 What this PR does

This PR is our home base for testing our new 4.0 release. This adds the highly anticipated variation of FrankenPHP and further optimizes serversideup/php to be highly optimized for deploying and maintaining Laravel applications.

🫵 WE NEED YOU: Help us test test this release

Important

Please keep reading the notes in this post before cowboy coding and throwing this into production 🤠

  1. This PR is in an "alpha" state and could change at anytime
  2. The images are located on a special "development" repository php-dev (not php)
  3. There are more changes than just adding FrankenPHP. Read the entire post for what's new

View Test Images on Dockerhub →

Anything tagged with 283- will reference this PR and should be tested. Notice we're testing on php-dev (not php).

serversideup/php-dev:283-*

🐛 Reporting Issues

👨‍🔬 What to test

We really need the community's help on testing these images as we progress towards stable.

1️⃣ All variations: Laravel Automations

There were huge improvements made to the 50-laravel-automations.sh script.

  1. Does the script still work after upgrading an existing FPM-NGINX image?
  2. Is the script behaving well and giving you the results you anticipate?

2️⃣ FrankenPHP: Caddyfile structure

  1. Do you like the structure of the Caddyfile?
  2. Do you find the script flexible and easy to expand?
  3. Do the performance defaults make sense and follow best practices?
  4. Do the security defaults make sense and follow best practices?
  5. Are you getting the RealIP when the container is behind a CloudFlare proxy?
  6. How is your experience with logging? Does the LOG_LEVEL_OUTPUT help you out? Are the logs too noisy?

3️⃣ Test start up scripts

We made improvements to the entrypoint script.

  1. Are you getting any weird behaivor with old scripts?
  2. Do you like how we execute things in a subshell to isolate scripts and have a more natural developer experience?

🌎 Latest Documentation

Use the link below to reference the latest documentation (it will automatically update as we keep improving the docs).
View the latest documentation →

⚡️ What's new

🧟‍♂️ FrankenPHP variations now added

The highly anticipated release of FrankenPHP is now available. These images come with many enhancements compared to the official FrankenPHP images.

Images are unprivileged by default

For best security practices, we're running things as www-data. This dramatically reduces your security footprint when running PHP in production. Because of this, we're listening on 8080 (HTTP) and 8443 (HTTPS). This follows the same design pattern as our other images.

Native health checks

Health checks are critical for ensureing zero-downtime deployments. Our images come "batteries included" with intelligent health check endpoints that can easily be customized with $HEALTHCHECK_PATH. By default, our images ensure /healthcheck is alive with Caddy, but you can change this variable to HEALTHCHECK_PATH=/up and it will use the built-in Laravel health check endpoint to ensure Laravel is actually ready to accept requests.

Extremely flexible and production-grade Caddyfile by default

The default FrankenPHP Caddyfile gives you enough to get started, but we spent a ton of time making sure that we're shipping production-grade and secure configurations by default. This includes:

  1. Native CloudFlare support with trusted IP addresses
  2. Performance and caching rules made available by default
  3. Security headers included by default
  4. Flexible and powerful logging defaults
  5. Simple and intelligent self-signed certificate generation (but still allowing you to use Let's Encrypt if you wanted)

Designed for mass-scale production deployments

It's almost unbelievable and amazing how well FrankenPHP works with Caddy as a proxy. This tight integration allows you to do magical things like deploy trusted SSLs with Let's Encrypt. The only problem is, you probably have something else serving SSL termination and you most likely would not use that feature in a single container.

Our approach is "orchestrator first", meaning the image is designed for mass-scale in mind.

This means we're shipping the image assuming that you're doing TLS termination elsewhere. This makes it easier for you to scale and perform zero-downtime deployments:

flowchart TD
    A["Reverse Proxy 
    (Not FrankenPHP)"] -->C{Container Service}
    C -->|STOP| D[MyApp:v1]
    C -->|START| E[MyApp:v2]
Loading

Flexible environment configuration

Just like the experience with our other PHP variations, we also have things like SSL_MODE, LOG_OUTPUT_LEVEL, changing PHP INI settings with environment variables, all our helper scripts for changing permissions, etc. that make it a breeze for you to customize how the PHP image behaves.

More operating system variations

We are able to compile FrankenPHP by source, which allows us to open up support for many operating systems.

How tagging works
There's more to it, but in general the primary principle is:

{php-minor-version}-{variation}-{os-version}

This means we're offering FrankenPHP with the following operating systems:

  1. trixie: Debian Trixie (13)
  2. bookworm: Debian Bookworm (12)
  3. alpine3.22: Alpine 3.22
  4. alpine3.21: Alpine 3.21

🌎 New Environment Variables

The following environment variables are now available:

Environment Variable Default Authored By
AUTORUN_DEBUG false @jaydrogers
AUTORUN_LARAVEL_OPTIMIZE true @aSeriousDeveloper
AUTORUN_LARAVEL_MIGRATION_FORCE true @jaydrogers
AUTORUN_LARAVEL_MIGRATION_MODE default @jaydrogers
AUTORUN_LARAVEL_MIGRATION_SEED false @jaydrogers
AUTORUN_LARAVEL_MIGRATION_SKIP_DB_CHECK false @jaydrogers
NGINX_ACCESS_LOG /dev/stdout @robsontenorio
NGINX_CLIENT_MAX_BODY_SIZE 100M @dlundgren
NGINX_ERROR_LOG /dev/stderr @robsontenorio
NGINX_LISTEN_IP_PROTOCOL all @yuuzukatsu, @jaydrogers
PHP_FPM_PM_MAX_REQUESTS 0 @ifaridjalilov, @thueske
PHP_FPM_PM_STATUS_PATH /status @jaydrogers
PHP_MAX_INPUT_VARS 1000 @RadeJR
PHP_OPCACHE_ENABLE_FILE_OVERRIDE 0 @jaydrogers
PHP_OPCACHE_FORCE_RESTART_TIMEOUT 180 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_JIT off @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_JIT_BUFFER_SIZE 0 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_SAVE_COMMENTS 1 @aSeriousDeveloper, @jaydrogers
PHP_OPCACHE_VALIDATE_TIMESTAMPS 1 @aSeriousDeveloper, @jaydrogers
PHP_REALPATH_CACHE_TTL 120 @jaydrogers
PHP_ZEND_DETECT_UNICODE null @jaydrogers
PHP_ZEND_MULTIBYTE Off @jaydrogers

🤩 New Features

Laravel Automations Script Improvements

The Laravel Automations script has been completely refactored to make it easier to support advanced Laravel features. Tons of new features are now available:

"php artisan optmize" now run by default

Instead of setting AUTORUN_LARAVEL_ROUTE_CACHE, AUTORUN_LARAVEL_VIEW_CACHE etc, we use AUTORUN_LARAVEL_OPTIMIZE by default, which calls php artisan optimize. Readjusting our logic to this new structure not only simplifies our approach to follow Laravel's best practices, it allows you to hook into the optimize command if you need to use it for your own application.

If you don't want to use php artisan optimize or if you're running an older version of Laravel, no sweat! Our refactored approach is backwards compatible and you can enable/disable certain functions by just setting your desired values to AUTORUN_LARAVEL_ROUTE_CACHE, AUTORUN_LARAVEL_VIEW_CACHE etc.

Added support for "migration modes"

We now support different migration modes of refresh or fresh by Laravel. This is super helpful if you need to seed a preview environment.

Migration Mode Description
default (our default behavior) Runs php artisan migrate - standard forward migrations
fresh Runs php artisan migrate:fresh - drops all tables and re-runs migrations
refresh Runs php artisan migrate:refresh - rolls back and re-runs migrations

Specify which database connections to run migrations with

If you run multiple databases with a multi-tenant Laravel application, you may need to specify your exact database connection that you'd like to use. We created AUTORUN_LARAVEL_MIGRATION_DATABASE so you can set the configuration name of the database connection you'd like to run migrations on (ie. mysql). Supports running against multiple databases too (ie. mysql,pgsql).

Added "--seed" option to migrations

Laravel has a helpful flag of --seed that you can run with php artisan migrate that will indicate if the seed task should be re-run. If you need this, just set AUTORUN_LARAVEL_MIGRATION_SEED to true.

Easier debugging

If you're running into issues with automations, set AUTORUN_DEBUG to true and you'll get helpful output to help you figure out why you're running into issues.

Control NGINX IP listening protocols with NGINX_LISTEN_IP_PROTOCOL

Are you running an IPv6 only cluster with fpm-nginx? Now you can set NGINX_LISTEN_IP_PROTOCOL: ipv6 and NGINX will listen on IPv6 stacks only. Same thing works if you set it to ipv4, then IPv6 will be disabled.

Great for Kubernetes clusters! 🤓

Default behavior is to keep a non-breaking change of all which will listen on IPv4 and IPv6.

🧘‍♂️ Quality Of Life Improvements

Improved health checks

A brilliant PR by @aSeriousDeveloper was merged which dramatically improves our "definition of healthy", especially on container start up. This approach utilizes start-period and start-interval which will give us more accurate readings and flexibility for container start up.

Option Description Old Value New Value
start-period start period provides initialization time for containers that need time to bootstrap. Probe failure during that period will not be counted towards the maximum number of retries. However, if a health check succeeds during the start period, the container is considered started and all consecutive failures will be counted towards the maximum number of retries. - 60s
start-interval start interval is the time between health checks during the start period. - 3s
timeout If a single run of the check takes longer than timeout seconds then the check is considered to have failed. 3s 3s
retries It takes retries consecutive failures of the health check for the container to be considered unhealthy. 3 3
interval The health check will first run interval seconds after the container is started, and then again interval seconds after each previous check completes. 5s 10s

Startup and Entrypoint Scripts

  • Changed approach to executing entrypoint.d scripts so we can gracefully handle exit 0 in a entrypoint script
  • Re-designed container start up info script

Changing file permissions (docker-php-serversideup-set-file-permissions)

  • Added automated service detection (--service is now optional)
  • Added --dir parameter for specifying extra directories (you can specify multiple --dir flags for multiple directories)

Quiet health check access logs

  • Improved fpm-nginx and fpm-apache logs to never show access log output for any request$HEALTHCHECK_PATH. Things are much quieter now 😃

🐛 Bug Fixes

All images

S6-based images (fpm-nginx and fpm-apache)

fpm-nginx

fpm-apache

⏫ Dependency updates

  • Updates install-php-extensions script to v2.9.11

✅ Jay's Checklist

These are notes to myself so I can remember where I left off as I start merging more things in:

Development

  • Adds FrankenPHP be offered as a variation
  • Test LOG_LEVEL_OUTPUT
  • Convert Caddyfile to work like our fpm-nginx image
  • Allow the "autorun" scripts and other custom init scripts to run before bringing up FrankenPHP
  • Allow the PHP minor version to be selected with FrankenPHP
  • Allow the PHP_ environment variables from other Server Side Up images to work with FrankenPHP
  • Ensure set-id and set-filepermissions scripts work well
  • Ensure CloudFlare Real IPs work
  • Create native healthchecks
  • See if I can quiet the logs by default
  • Ensure FrankenPHP healthchecks are dynamic with $HEALTHCHECK_PATH

Documentation

  • Go through all pages and see if it is appropriate to update FrankenPHP
  • Add FrankenPHP on the homepage
  • Document the healthchecks for FrankenPHP

@jaydrogers jaydrogers linked an issue Feb 8, 2024 that may be closed by this pull request
@jaydrogers jaydrogers marked this pull request as draft February 8, 2024 00:01
@Sammyjo20
Copy link

This would be super cool to have! Great work on this so far!

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 13, 2024

Deploying serversideup-php with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5a3699c
Status:🚫  Build failed.

View logs

@GunniBusch
Copy link

This would really be a nice addition..

@thinkstylestudio
Copy link

This will be a wonderful addition!

@mihai-burduselu-ptt
Copy link

mihai-burduselu-ptt commented Aug 27, 2024

This would be a great feature! 🚀
Any updates here?

@hookenz
Copy link

hookenz commented Oct 3, 2025

@jaydrogers - while FrankenPHP is really fantastic. I do find the json logs from Caddy that Franken is built upon to be cumbersome to look at when debugging. Fine if you were to ingest them into elasticache but a headache to view as a user developing software locally.

Could you consider compiling in more logging options or do something like this?
https://caddy.community/t/making-caddy-logs-more-readable/7565

Another reason we could do with a franken builder option. But maybe you could build that in by default and allow configuring it.
It might be good to get some opinions from those who are trying it out.

--with github.com/dunglas/frankenphp=./ \
--with github.com/dunglas/frankenphp/caddy=./caddy/ \
--with github.com/dunglas/caddy-cbrotli \
# Mercure and Vulcain are included in the official build, but feel free to remove them
Copy link

@hookenz hookenz Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--with github.com/caddyserver/transform-encoder \

Would you consider installing this by default to give people the option of an alternative logging format rather than the caddy default which is not really designed for humans.
See: https://caddyserver.com/docs/modules/caddy.logging.encoders.transform

Copy link
Member Author

@jaydrogers jaydrogers Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have CADDY_LOG_FORMAT set to console by default and LOG_LEVEL_OUTPUT set to warn by default.

If you change LOG_LEVEL_OUTPUT to info, then you'll start seeing logs like this:

spin-production_php.1.wg4clerezt9c@spin-test-deploy    | 2025/10/08 19:04:11.570	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "10.0.1.10", "remote_port": "39440", "client_ip": "10.0.1.10", "proto": "HTTP/2.0", "method": "GET", "host": "10.0.1.17:8443", "uri": "/up", "headers": {"Accept-Encoding": ["gzip"], "User-Agent": ["Go-http-client/2.0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": ""}}, "bytes_read": 0, "user_id": "", "duration": 0.546836366, "size": 858, "status": 200, "resp_headers": {"X-Content-Type-Options": ["nosniff"], "X-Frame-Options": ["SAMEORIGIN"], "Date": ["Wed, 08 Oct 2025 19:04:11 GMT"], "Vary": ["Accept-Encoding"], "Strict-Transport-Security": ["max-age=31536000; includeSubDomains"], "Alt-Svc": ["h3=\":8443\"; ma=2592000"], "Cache-Control": ["no-cache, private"], "Content-Type": ["text/html; charset=UTF-8"], "Content-Encoding": ["gzip"], "Referrer-Policy": ["strict-origin-when-cross-origin"]}}
spin-production_php.1.wg4clerezt9c@spin-test-deploy    | 2025/10/08 19:04:16.927	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "10.0.1.10", "remote_port": "39440", "client_ip": "1.2.3.4", "proto": "HTTP/2.0", "method": "GET", "host": "spin-deploy.example.com", "uri": "/info.php", "headers": {"X-Forwarded-Server": ["2faca4915f81"], "Sec-Fetch-Mode": ["navigate"], "Sec-Fetch-User": ["?1"], "X-Forwarded-Port": ["443"], "Priority": ["u=0, i"], "X-Forwarded-For": ["1.2.3.4"], "Sec-Fetch-Dest": ["document"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Upgrade-Insecure-Requests": ["1"], "Pragma": ["no-cache"], "Accept-Language": ["en-US,en;q=0.5"], "X-Forwarded-Host": ["spin-deploy.example.com"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0"], "Sec-Fetch-Site": ["none"], "Te": ["trailers"], "Cookie": ["REDACTED"], "X-Forwarded-Proto": ["https"], "Cache-Control": ["no-cache"], "X-Real-Ip": ["1.2.3.4"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": ""}}, "bytes_read": 0, "user_id": "", "duration": 0.016502452, "size": 26430, "status": 200, "resp_headers": {"Content-Type": ["text/html; charset=UTF-8"], "Content-Encoding": ["zstd"], "Referrer-Policy": ["strict-origin-when-cross-origin"], "X-Content-Type-Options": ["nosniff"], "X-Frame-Options": ["SAMEORIGIN"], "Alt-Svc": ["h3=\":8443\"; ma=2592000"], "Vary": ["Accept-Encoding"], "Strict-Transport-Security": ["max-age=31536000; includeSubDomains"]}}
spin-production_php.1.wg4clerezt9c@spin-test-deploy    | 2025/10/08 19:04:18.877	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "10.0.1.10", "remote_port": "39440", "client_ip": "1.2.3.4", "proto": "HTTP/2.0", "method": "GET", "host": "spin-deploy.example.com", "uri": "/info.php", "headers": {"X-Forwarded-Port": ["443"], "X-Forwarded-Proto": ["https"], "Cache-Control": ["no-cache"], "Cookie": ["REDACTED"], "X-Forwarded-Server": ["2faca4915f81"], "Accept-Language": ["en-US,en;q=0.5"], "Priority": ["u=0, i"], "X-Forwarded-For": ["1.2.3.4"], "Upgrade-Insecure-Requests": ["1"], "Sec-Fetch-Dest": ["document"], "Sec-Fetch-Site": ["none"], "Accept": ["text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"], "Sec-Fetch-Mode": ["navigate"], "User-Agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0"], "X-Real-Ip": ["1.2.3.4"], "Pragma": ["no-cache"], "Te": ["trailers"], "X-Forwarded-Host": ["spin-deploy.example.com"], "Accept-Encoding": ["gzip, deflate, br, zstd"], "Sec-Fetch-User": ["?1"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": ""}}, "bytes_read": 0, "user_id": "", "duration": 0.007419604, "size": 26423, "status": 200, "resp_headers": {"X-Frame-Options": ["SAMEORIGIN"], "Alt-Svc": ["h3=\":8443\"; ma=2592000"], "Content-Encoding": ["zstd"], "Referrer-Policy": ["strict-origin-when-cross-origin"], "X-Content-Type-Options": ["nosniff"], "Content-Type": ["text/html; charset=UTF-8"], "Vary": ["Accept-Encoding"], "Strict-Transport-Security": ["max-age=31536000; includeSubDomains"]}}
spin-production_php.1.wg4clerezt9c@spin-test-deploy    | 2025/10/08 19:04:41.039	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "10.0.1.10", "remote_port": "39440", "client_ip": "10.0.1.10", "proto": "HTTP/2.0", "method": "GET", "host": "10.0.1.17:8443", "uri": "/up", "headers": {"Accept-Encoding": ["gzip"], "User-Agent": ["Go-http-client/2.0"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "h2", "server_name": ""}}, "bytes_read": 0, "user_id": "", "duration": 0.035062683, "size": 857, "status": 200, "resp_headers": {"Strict-Transport-Security": ["max-age=31536000; includeSubDomains"], "X-Content-Type-Options": ["nosniff"], "X-Frame-Options": ["SAMEORIGIN"], "Alt-Svc": ["h3=\":8443\"; ma=2592000"], "Date": ["Wed, 08 Oct 2025 19:04:41 GMT"], "Content-Type": ["text/html; charset=UTF-8"], "Referrer-Policy": ["strict-origin-when-cross-origin"], "Cache-Control": ["no-cache, private"], "Content-Encoding": ["gzip"], "Vary": ["Accept-Encoding"]}}

I know that's probably not ideal (but slightly better than defaults?).

Allowing customization of the logs

I really like your suggestion to have this possible, I am just hesitant to merge something that I don't know much about (this FrankenPHP image is my first time running FrankenPHP and Caddy, so I don't want to bite off more than I can chew 🤪)

Would you mind opening your proposal up as a feature request? I'd like to get more discussion on it from the community if there are any native ways we can do this without including too many plugins #66

…roved error handling. Added support for multiple databases, migration modes, and seeding. Updated documentation to reflect these changes and added a new script for testing database connections.
@jaydrogers
Copy link
Member Author

Just keeping everyone on this thread updated with some major changes that I just pushed. I added this to the top comment at the top, but wanted to email it out as well.

My recent changes include a major refactor of our "Laravel Automations" script.

🤩 New Features

Laravel Automations Script Improvements

The Laravel Automations script has been completely refactored to make it easier to support advanced Laravel features. Tons of new features are now available:

"php artisan optmize" now run by default

Instead of setting AUTORUN_LARAVEL_ROUTE_CACHE, AUTORUN_LARAVEL_VIEW_CACHE etc, we use AUTORUN_LARAVEL_OPTIMIZE by default, which calls php artisan optimize. Readjusting our logic to this new structure not only simplifies our approach to follow Laravel's best practices, it allows you to hook into the optimize command if you need to use it for your own application.

If you don't want to use php artisan optimize or if you're running an older version of Laravel, no sweat! Our refactored approach is backwards compatible and you can enable/disable certain functions by just setting your desired values to AUTORUN_LARAVEL_ROUTE_CACHE, AUTORUN_LARAVEL_VIEW_CACHE etc.

Added support for "migration modes"

We now support different migration modes of refresh or fresh by Laravel. This is super helpful if you need to seed a preview environment.

Migration Mode Description
default (our default behavior) Runs php artisan migrate - standard forward migrations
fresh Runs php artisan migrate:fresh - drops all tables and re-runs migrations
refresh Runs php artisan migrate:refresh - rolls back and re-runs migrations

Specify which database connections to run migrations with

If you run multiple databases with a multi-tenant Laravel application, you may need to specify your exact database connection that you'd like to use. We created AUTORUN_LARAVEL_MIGRATION_DATABASE so you can set the configuration name of the database connection you'd like to run migrations on (ie. mysql). Supports running against multiple databases too (ie. mysql,pgsql).

Added "--seed" option to migrations

Laravel has a helpful flag of --seed that you can run with php artisan migrate that will indicate if the seed task should be re-run. If you need this, just set AUTORUN_LARAVEL_MIGRATION_SEED to true.

Easier debugging

If you're running into issues with automations, set AUTORUN_DEBUG to true and you'll get helpful output to help you figure out why you're running into issues.

jaydrogers and others added 3 commits October 8, 2025 14:16
…php variation

- Introduced a HEALTHCHECK command in the Dockerfile with specified parameters.
- Updated Caddyfile to define healthcheck endpoints and log skipping for both default and custom healthcheck paths.
- Enhanced full Caddyfile to redirect localhost healthcheck requests to HTTPS.
@jaydrogers
Copy link
Member Author

Another update

  • Native health checks are now supported in FrankenPHP 😎
Screenshot 2025-10-08 at 15 21 22@2x

@jaydrogers
Copy link
Member Author

Update for those who didn't get yesterday's update 😃

We're in beta 🥳

* Fix missing gettext, procps and zip on FrankenPHP Variation

* Remove gettext (we don't need envsubst for FrankenPHP)

* Update default configurations to include libstdc++6 and clarify procps requirements for Debian images

* Removed zip -- we don't need it

---------

Co-authored-by: Jay Rogers <jaydrogers@users.noreply.serversideup.net>
- Introduced a new section explaining what Docker is and its advantages for containerizing applications.
- Added a demo video link for the Spin project to help users get started with Docker.
- Updated the FPM-NGINX section to reflect its historical significance and current relevance.
- Marked the NGINX Unit variation as deprecated due to its discontinuation.
- Added a new section for the FrankenPHP variation, highlighting its features and benefits.
The `fpm-nginx` variation is great for people who want to run Laravel applications or similar. This allows you to serve static content quickly with NGINX but also pass PHP requests to PHP-FPM. Similar to PHP-Apache, there are two processes required to run this variation. We use S6 Overlay to ensure the container health is accurate.
Over the last 15+ years `fpm-nginx` has been "the way" to run PHP web applications, including Laravel. Since around 2010, it's been adopted and trusted by some of the best PHP system administrators out there. As of 2025, we're starting to see other options like FrankenPHP push the industry forward, but `fpm-nginx` is very stable and still widely used today.

The only caveat with running FPM + NGINX together with Docker is it requires two processes (which can lead to strange container behaviors). Thankfully, we took this all in mind with our design by using 's been trusted and deployed millions of times and there's a large adoption This allows you to serve static content quickly with NGINX but also pass PHP requests to PHP-FPM. Similar to PHP-Apache, there are two processes required to run this variation. We use S6 Overlay to ensure the container health is accurate.
Copy link

@hookenz hookenz Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence doesn't read quite right.

design by using 's been trusted

Line 83. "Thankfully, we took this all in mind with our design by using 's been trusted"

…ns, including detailed descriptions for CLI, FPM, FPM-Apache, FPM-NGINX, and FrankenPHP. Marked NGINX Unit as deprecated and provided migration guidance. Improved overall structure for better user understanding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚡️ Enhancement Items that are new features requested to be added.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Create a FrankenPHP variation