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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ SCRIPT_MICROSERVICE_PUSHER_SCHEME=
SCRIPT_MICROSERVICE_PUSHER_HOST=
SCRIPT_MICROSERVICE_PUSHER_PORT=

# FrankenPHP workers ignore CLI php.ini. Use Caddyfile + --caddyfile=Caddyfile.
# FRANKENPHP_MEMORY_LIMIT=3072M

KEYCLOAK_CLIENT_ID=
KEYCLOAK_CLIENT_SECRET=
KEYCLOAK_BASE_URL=
Expand Down
25 changes: 25 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
{$CADDY_GLOBAL_OPTIONS}

frankenphp {
# FrankenPHP workers ignore CLI php.ini / PHPRC. Set memory here.
php_ini memory_limit {$FRANKENPHP_MEMORY_LIMIT:3072M}

worker {
file "{$APP_PUBLIC_PATH}/frankenphp-worker.php"
{$CADDY_SERVER_WORKER_DIRECTIVE}
}
}
}

{$CADDY_SERVER_SERVER_NAME} {
route {
root * "{$APP_PUBLIC_PATH}"

php_server {
index frankenphp-worker.php
try_files {path} frankenphp-worker.php
resolve_root_symlink
}
}
}
17 changes: 17 additions & 0 deletions config/octane.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,21 @@

'max_execution_time' => 30,

/*
|--------------------------------------------------------------------------
| FrankenPHP / Caddy
|--------------------------------------------------------------------------
|
| Extra env vars for the FrankenPHP process. Start Octane with
| `--caddyfile=Caddyfile` so php_ini memory_limit is applied.
| PHPRC / PHP_INI does not change FrankenPHP worker memory (stays 128M).
|
*/

'caddy' => [
'env' => [
'FRANKENPHP_MEMORY_LIMIT' => env('FRANKENPHP_MEMORY_LIMIT', '3072M'),
],
],

];
Loading