Add a Caddyfile and update FrankenPHP to 1.5 and PHP to 8.4 #527
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, I've been using FrankenPHP for a while and it's fantastic. So much better than Unit. And just like Unit it's single binary and a one container option.
This initial Caddyfile sets up the server to listen on 8080 like your other containers.
It also sets up logging to stdout and creates a healthcheck endpoint with logging turned off for the healthchecks.
There are some variables, some of which are inherited from frankenphp as I based the caddyfile from theirs.
$FRANKENPHP_CONFIG
- optional config for frankenphp.e.g. from their website: enable worker mode - ENV FRANKENPHP_CONFIG="worker ./public/index.php"
$CADDY_GLOBAL_OPTIONS - maybe we should rename this? It's inherited from the original Caddyfile that comes with the Caddy server.
What I added:
$HEALTHCHECK_PATH - like the other images you can change it away from the default /heathcheck
$FRANKENPHP_WEBROOT - defaults to /var/www/html/public/ Just like your other images.
Because FRANKENPHP_CONFIG already exists in FRANKENPHP documentation, I kept the same convention of calling it FRANKENPHP rather than FRANKEN_PHP or FRANKEN
I hope that gets us a bit further down the road.