From 48c4d5b44d18d5f9eacfbba4c3155247563d075f Mon Sep 17 00:00:00 2001 From: Refringe Date: Sat, 31 Aug 2024 11:41:25 -0400 Subject: [PATCH] Back to Frankenphp! Bug fix is in and we're back to the races! This change requires: 1. You to update your .env file to: `OCTANE_SERVER=frankenphp` 2. An already build sail container to be rebuilt: ``` docker compose down -v sail build --no-cache sail up -d ``` --- .env.full | 2 +- .gitignore | 27 ++++++++++++++------------- config/caddy/autosave.json | 1 - config/octane.php | 5 +---- docker-compose.yml | 4 +++- 5 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 config/caddy/autosave.json diff --git a/.env.full b/.env.full index c90208e..556d2e9 100644 --- a/.env.full +++ b/.env.full @@ -70,7 +70,7 @@ MAIL_ENCRYPTION=null MAIL_FROM_ADDRESS="no-reply@sp-tarkov.com" MAIL_FROM_NAME="${APP_NAME}" -OCTANE_SERVER=swoole +OCTANE_SERVER=frankenphp OCTANE_HTTPS=false SAIL_XDEBUG_MODE=develop,debug,coverage diff --git a/.gitignore b/.gitignore index 54dc261..3ccc7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,19 +3,20 @@ .env.backup .env.production .phpunit.result.cache -/.fleet -/.idea -/.phpunit.cache -/.vscode -/caddy -/config/psysh -/data -/node_modules -/public/build -/public/hot -/public/storage -/storage/*.key -/vendor +.fleet +.idea +.phpunit.cache +.vscode +caddy +config/psysh +config/caddy +data +node_modules +public/build +public/hot +public/storage +storage/*.key +vendor auth.json frankenphp frankenphp-worker.php diff --git a/config/caddy/autosave.json b/config/caddy/autosave.json deleted file mode 100644 index d5799da..0000000 --- a/config/caddy/autosave.json +++ /dev/null @@ -1 +0,0 @@ -{"admin":{"listen":"localhost:2019"},"apps":{"frankenphp":{"workers":[{"file_name":"/var/www/html/public/frankenphp-worker.php"}]},"http":{"servers":{"srv0":{"automatic_https":{"disable_redirects":true},"listen":[":443"],"logs":{"logger_names":{"localhost":["log0"]}},"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"vars","root":"/var/www/html/public"},{"encodings":{"br":{},"gzip":{},"zstd":{}},"handler":"encode","prefer":["zstd","br","gzip"]}]},{"handle":[{"handler":"static_response","headers":{"Location":["{http.request.orig_uri.path}/"]},"status_code":308}],"match":[{"file":{"try_files":["{http.request.uri.path}/frankenphp-worker.php"]},"not":[{"path":["*/"]}]}]},{"handle":[{"handler":"rewrite","uri":"{http.matchers.file.relative}"}],"match":[{"file":{"split_path":[".php"],"try_files":["{http.request.uri.path}","{http.request.uri.path}/frankenphp-worker.php","frankenphp-worker.php"]}}]},{"handle":[{"handler":"php","resolve_root_symlink":true,"split_path":[".php"]}],"match":[{"path":["*.php"]}]},{"handle":[{"handler":"file_server"}]}]}]}]}],"match":[{"host":["localhost"]}],"terminal":true}]}}}},"logging":{"logs":{"default":{"exclude":["http.log.access.log0"]},"log0":{"encoder":{"fields":{"uri":{"actions":[{"parameter":"authorization","type":"replace","value":"REDACTED"}],"filter":"query"}},"format":"filter","wrap":{"format":"json"}},"include":["http.log.access.log0"],"level":"INFO"}}}} \ No newline at end of file diff --git a/config/octane.php b/config/octane.php index c6b2ad8..0a1ca51 100644 --- a/config/octane.php +++ b/config/octane.php @@ -12,13 +12,10 @@ use Laravel\Octane\Events\WorkerErrorOccurred; use Laravel\Octane\Events\WorkerStarting; use Laravel\Octane\Events\WorkerStopping; use Laravel\Octane\Listeners\CloseMonologHandlers; -use Laravel\Octane\Listeners\CollectGarbage; -use Laravel\Octane\Listeners\DisconnectFromDatabases; use Laravel\Octane\Listeners\EnsureUploadedFilesAreValid; use Laravel\Octane\Listeners\EnsureUploadedFilesCanBeMoved; use Laravel\Octane\Listeners\FlushOnce; use Laravel\Octane\Listeners\FlushTemporaryContainerInstances; -use Laravel\Octane\Listeners\FlushUploadedFiles; use Laravel\Octane\Listeners\ReportException; use Laravel\Octane\Listeners\StopWorkerIfNecessary; use Laravel\Octane\Octane; @@ -38,7 +35,7 @@ return [ | */ - 'server' => env('OCTANE_SERVER', 'swoole'), + 'server' => env('OCTANE_SERVER', 'frankenphp'), /* |-------------------------------------------------------------------------- diff --git a/docker-compose.yml b/docker-compose.yml index 85194b7..eb4b988 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,9 @@ services: XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}' XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}' IGNITION_LOCAL_SITES_PATH: '${PWD}' - SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --server=swoole --host=0.0.0.0 --port=80 --watch" + SUPERVISOR_PHP_COMMAND: "/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan octane:start --host=localhost --port=80 --admin-port=2019 --watch" + XDG_CONFIG_HOME: /var/www/html/config + XDG_DATA_HOME: /var/www/html/data volumes: - '.:/var/www/html' networks: