From 0964abdf3787182ba8874669515e8b39a2fecd8a Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Sat, 19 Jul 2025 21:30:18 -0500 Subject: [PATCH] wip: semi-working PHP8.5/FrankenPHP w/ async --- Dockerfile | 15 +++++------ compose.yml | 3 +++ docker/app/Caddyfile | 2 ++ public/test.php | 60 ++++++++++++++++++++++++++++++++++++++++++++ src/Tmdb/Tmdb.php | 4 ++- 5 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 public/test.php diff --git a/Dockerfile b/Dockerfile index b505e0f..e1a72cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,17 @@ -FROM dunglas/frankenphp:php8.4 +FROM registry.caldwell.digital/home/frankenphp:1.9.0-php8.5.0-ubuntu ENV SERVER_NAME=":80" ENV CADDY_GLOBAL_OPTIONS="auto_https off" ENV APP_RUNTIME="Runtime\\FrankenPhpSymfony\\Runtime" ENV APP_VERSION="0.0.1" +ENV SERVER_ROOT="/app/public" -RUN install-php-extensions \ - pdo_mysql \ - gd \ - intl \ - zip \ - opcache +#RUN install-php-extensions \ +# pdo_mysql \ +# gd \ +# intl \ +# zip \ +# opcache RUN apt update && apt install -y wget diff --git a/compose.yml b/compose.yml index 99366f6..7e8b31e 100755 --- a/compose.yml +++ b/compose.yml @@ -23,6 +23,9 @@ services: - mercure_data:/data - mercure_config:/config tty: true + ports: + - "8001:80" + command: "frankenphp php-server --root=/app/public" environment: TZ: America/Chicago MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!' diff --git a/docker/app/Caddyfile b/docker/app/Caddyfile index 92dabf0..9642210 100644 --- a/docker/app/Caddyfile +++ b/docker/app/Caddyfile @@ -3,6 +3,8 @@ frankenphp { {$FRANKENPHP_CONFIG} + num_threads 10 + max_threads 20 } } diff --git a/public/test.php b/public/test.php new file mode 100644 index 0000000..ed732d6 --- /dev/null +++ b/public/test.php @@ -0,0 +1,60 @@ +client = new Client( @@ -214,7 +217,6 @@ class Tmdb if ($season['episode_count'] <= 0 || $season['name'] === 'Specials') { continue; } - $series['episodes'][$season['season_number']] = Map::from( $client->getApi()->getSeason($series['id'], $season['season_number'])['episodes'] )->map(function ($data) {