Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions frameworks/PHP/laravel/deploy/franken/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
{$CADDY_GLOBAL_OPTIONS}

admin {$CADDY_SERVER_ADMIN_HOST}:{$CADDY_SERVER_ADMIN_PORT}

frankenphp {
worker "{$APP_PUBLIC_PATH}/frankenphp-worker.php" {$CADDY_SERVER_WORKER_COUNT}
}
}

{$CADDY_SERVER_SERVER_NAME} {
route {
# Mercure configuration is injected here...
{$CADDY_SERVER_EXTRA_DIRECTIVES}

# FrankenPHP!
# disable static files for this benchmark
# by using php instead of php_server
rewrite frankenphp-worker.php
php {
root "{$APP_PUBLIC_PATH}"
}
}
}
3 changes: 1 addition & 2 deletions frameworks/PHP/laravel/laravel-octane-frankenphp.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM dunglas/frankenphp

RUN install-php-extensions \
intl \
opcache \
pcntl \
pdo_mysql \
Expand All @@ -26,4 +25,4 @@ RUN frankenphp -v

EXPOSE 8080

ENTRYPOINT ["php", "artisan", "octane:frankenphp", "--port=8080"]
ENTRYPOINT ["php", "artisan", "octane:frankenphp", "--port=8080", "--caddyfile=/app/deploy/franken/Caddyfile"]
7 changes: 5 additions & 2 deletions frameworks/PHP/php/deploy/franken/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
:8080

route {
root * /php

# FrankenPHP!
# disable static files for this benchmark
# by using php instead of php_server
@phpFiles path *.php
php @phpFiles
php @phpFiles {
root /php
}

respond 404
}
17 changes: 6 additions & 11 deletions frameworks/PHP/symfony/deploy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@
:8080

route {
root * /symfony/public

# If the requested file does not exist, try index files
@indexFiles file {
try_files {path} {path}/runtime.php runtime.php
split_path .php
# FrankenPHP!
# disable static files for this benchmark
# by using php instead of php_server
rewrite runtime.php
php {
root /symfony/public
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to remove the @phpFiles stuff from here? You added it to the franken Caddyfile - seems weird to remove it from symfony.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, the previous configuration will check for files, directory index files and general php files, which is unnecessary in this case (there is only 1 entry file).

Rewriting directly to the entryfile will remove all 'file exists' checks..

}
rewrite @indexFiles {http.matchers.file.relative}

# FrankenPHP!
@phpFiles path *.php
php @phpFiles

respond 404
}
1 change: 0 additions & 1 deletion frameworks/PHP/symfony/symfony-franken.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM dunglas/frankenphp

# add additional extensions here:
RUN install-php-extensions \
intl \
opcache \
pdo_pgsql \
zip > /dev/null
Expand Down
Loading