-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FrankenPHP: Allow running Octane without artisan command (#968)
* FrankenPHP: Set defaults for APP_BASE_PATH, APP_PUBLIC_PATH and MAX_REQUESTS. * Checks env before server. * style.ci * Update frankenphp-worker.php --------- Co-authored-by: a.stecher <a.stecher@sportradar.com> Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
1 parent
4dc701b
commit b8b11ef
Showing
2 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<?php | ||
|
||
// Set a default for the application base path and public path if they are missing... | ||
$_SERVER['APP_BASE_PATH'] = $_ENV['APP_BASE_PATH'] ?? $_SERVER['APP_BASE_PATH'] ?? __DIR__.'/..'; | ||
$_SERVER['APP_PUBLIC_PATH'] = $_ENV['APP_PUBLIC_PATH'] ?? $_SERVER['APP_BASE_PATH'] ?? __DIR__; | ||
|
||
require __DIR__.'/../vendor/laravel/octane/bin/frankenphp-worker.php'; |