Skip to content

Add a Caddyfile and update FrankenPHP to 1.5 and PHP to 8.4 #527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: 280-create-a-frankenphp-variation
Choose a base branch
from

Conversation

hookenz
Copy link

@hookenz hookenz commented Apr 11, 2025

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.

@hookenz hookenz mentioned this pull request Apr 11, 2025
9 tasks
@hookenz
Copy link
Author

hookenz commented Apr 11, 2025

@jaydrogers it aint quite right yet. I'm adding more to this branch. Caddy syntax is a bit different too.
I think the syntax examples I find on the web might be for caddy v1 sometimes.... so then things don't work.

I'm trying to figure out the best way to enable SSL. There is also an automatic tls but it's not working for me.
But I can get the non-ssl version working.

@hookenz
Copy link
Author

hookenz commented Apr 14, 2025

Ok, figured out the automatic https. Now I need to figure out how to best structure the caddyfile

@jaydrogers
Copy link
Member

Thanks @hookenz! I greatly appreciate your help to dive in and test some things for me.

Recently I've been buried in client projects, but I will swing back to this as soon as I get a chance. I've had a lot of thoughts on Franken since I originally put my first PR together.

Will keep you posted 👍

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