-
-
Notifications
You must be signed in to change notification settings - Fork 200
Add default Caddyfile for FrankenPHP that mimics the FPM-NGINX experience #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
Merged
jaydrogers
merged 15 commits into
serversideup:280-create-a-frankenphp-variation
from
hookenz:280-create-a-frankenphp-variation
Aug 28, 2025
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b64ea6c
update franken versions and create an initial caddyfile
82a43d7
Caddy likes tabs over spaces
55c8d61
Set default env vars in the dockerfile, create webroot
06dc3ad
update dockerfile and add healthcheck
8e51173
update caddyfile. https not yet working
fa8ffba
Merge branch '280-create-a-frankenphp-variation' into 280-create-a-fr…
jaydrogers 07f1541
Refactor dependency installs to support "docker-php-serversideup-set-…
jaydrogers a6eb819
Fix typo in SSL certificate path in 10-init-unit.sh script
jaydrogers 59da6c4
Add /etc/ssl/private directory to file permissions in docker-php-serv…
jaydrogers 52aa77f
Add script to generate self-signed SSL certificate and key for container
jaydrogers 5da6967
Update Dockerfile to copy entrypoint scripts to /etc/entrypoint.d/ fo…
jaydrogers b2ab4de
Remove reference file
jaydrogers 7d55c67
Add Caddy configuration options and SSL mode handling for FrankenPHP
jaydrogers 4a5affc
Enhance Caddyfile configuration for FrankenPHP with security and cach…
jaydrogers 2337bf0
Add logging configuration options for Caddy in FrankenPHP
jaydrogers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| { | ||
| {$CADDY_GLOBAL_OPTIONS} | ||
|
|
||
| http_port 8080 | ||
| https_port 8443 | ||
|
|
||
| # todo: don't automatically redirect | ||
| auto_https disable_redirects | ||
|
|
||
| # todo: just testing | ||
| local_certs | ||
|
|
||
| log { | ||
| format console | ||
| } | ||
|
|
||
| frankenphp { | ||
| #worker /path/to/your/worker.php | ||
| {$FRANKENPHP_CONFIG} | ||
| } | ||
| } | ||
|
|
||
| {$CADDY_EXTRA_CONFIG} | ||
|
|
||
| (common) { | ||
| log { | ||
| output stdout | ||
| } | ||
|
|
||
| log_skip {$HEALTHCHECK_PATH}* | ||
|
|
||
| #log { | ||
| # # Redact the authorization query parameter that can be set by Mercure | ||
| # format filter { | ||
| # request>uri query { | ||
| # replace authorization REDACTED | ||
| # } | ||
| # } | ||
| #} | ||
|
|
||
| encode zstd br gzip | ||
|
|
||
| root * {$FRANKENPHP_WEBROOT} | ||
|
|
||
| route {$HEALTHCHECK_PATH} { | ||
| respond "OK" 200 | ||
| } | ||
|
|
||
| # Uncomment the following lines to enable Mercure and Vulcain modules | ||
| #mercure { | ||
| # # Transport to use (default to Bolt) | ||
| # transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} | ||
| # # Publisher JWT key | ||
| # publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} | ||
| # # Subscriber JWT key | ||
| # subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} | ||
| # # Allow anonymous subscribers (double-check that it's what you want) | ||
| # anonymous | ||
| # # Enable the subscription API (double-check that it's what you want) | ||
| # subscriptions | ||
| # # Extra directives | ||
| # {$MERCURE_EXTRA_DIRECTIVES} | ||
| #} | ||
| #vulcain | ||
|
|
||
| {$CADDY_SERVER_EXTRA_DIRECTIVES} | ||
|
|
||
| php_server | ||
| } | ||
|
|
||
| :8080 { | ||
| import common | ||
| } | ||
|
|
||
| :8443 { | ||
| tls internal | ||
| import common | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.