From 852157fd400a45807de6abbd654b38dee08b9b66 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Sun, 22 Oct 2023 22:21:06 -0300 Subject: [PATCH 1/3] octane to php 8.2 --- presets/laravel+octane/config.yml | 14 +++++++------- recipes/php-8.1-roadrunner.yml | 8 -------- recipes/php-8.1-swoole.yml | 8 -------- recipes/php-8.2-roadrunner.yml | 8 ++++++++ recipes/php-8.2-swoole.yml | 8 ++++++++ .../{php81-roadrunner.yml => php82-roadrunner.yml} | 2 +- .../app/{php81-swoole.yml => php82-swoole.yml} | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 recipes/php-8.1-roadrunner.yml delete mode 100644 recipes/php-8.1-swoole.yml create mode 100644 recipes/php-8.2-roadrunner.yml create mode 100644 recipes/php-8.2-swoole.yml rename templates/app/{php81-roadrunner.yml => php82-roadrunner.yml} (90%) rename templates/app/{php81-swoole.yml => php82-swoole.yml} (88%) diff --git a/presets/laravel+octane/config.yml b/presets/laravel+octane/config.yml index c0a51b33..27c3aca7 100644 --- a/presets/laravel+octane/config.yml +++ b/presets/laravel+octane/config.yml @@ -13,14 +13,14 @@ create: - name: 'Swoole' actions: - scripts: - - docker pull -q kooldev/php:8.1-nginx - - docker pull -q kooldev/php:8.1-nginx-swoole - - kool docker kooldev/php:8.1-nginx-swoole composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY + - docker pull -q kooldev/php:8.2-nginx + - docker pull -q kooldev/php:8.2-nginx-swoole + - kool docker kooldev/php:8.2-nginx-swoole composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY - name: 'RoadRunner' actions: - scripts: - - docker pull -q kooldev/php:8.1-nginx - - kool docker kooldev/php:8.1-nginx composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY + - docker pull -q kooldev/php:8.2-nginx + - kool docker kooldev/php:8.2-nginx composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY # Preset defines the workflow for installing this preset in the current working directory preset: @@ -40,12 +40,12 @@ preset: actions: - merge: scripts/laravel+octane+swoole.yml dst: kool.yml - - recipe: php-8.1-swoole + - recipe: php-8.2-swoole - name: 'RoadRunner' actions: - merge: scripts/laravel+octane+roadrunner.yml dst: kool.yml - - recipe: php-8.1-roadrunner + - recipe: php-8.2-roadrunner - name: 'Customize Database, Cache and Node Package Manager' actions: diff --git a/recipes/php-8.1-roadrunner.yml b/recipes/php-8.1-roadrunner.yml deleted file mode 100644 index b0568e87..00000000 --- a/recipes/php-8.1-roadrunner.yml +++ /dev/null @@ -1,8 +0,0 @@ -title: "PHP 8.1 + RoadRunner" - -actions: - - merge: app/php81-roadrunner.yml - dst: docker-compose.yml - - scripts: - - kool docker kooldev/php:8.1-nginx composer require laravel/octane spiral/roadrunner spiral/roadrunner-http spiral/roadrunner-cli - - kool docker kooldev/php:8.1-nginx php artisan octane:install --server=roadrunner --no-interaction diff --git a/recipes/php-8.1-swoole.yml b/recipes/php-8.1-swoole.yml deleted file mode 100644 index 4b65dcf9..00000000 --- a/recipes/php-8.1-swoole.yml +++ /dev/null @@ -1,8 +0,0 @@ -title: "PHP 8.1 + Swoole" - -actions: - - merge: app/php81-swoole.yml - dst: docker-compose.yml - - scripts: - - kool docker kooldev/php:8.1-nginx-swoole composer require laravel/octane - - kool docker kooldev/php:8.1-nginx-swoole php artisan octane:install --server=swoole diff --git a/recipes/php-8.2-roadrunner.yml b/recipes/php-8.2-roadrunner.yml new file mode 100644 index 00000000..f16fdb0a --- /dev/null +++ b/recipes/php-8.2-roadrunner.yml @@ -0,0 +1,8 @@ +title: "PHP 8.2 + RoadRunner" + +actions: + - merge: app/php82-roadrunner.yml + dst: docker-compose.yml + - scripts: + - kool docker kooldev/php:8.2-nginx composer require laravel/octane spiral/roadrunner spiral/roadrunner-http spiral/roadrunner-cli + - kool docker kooldev/php:8.2-nginx php artisan octane:install --server=roadrunner --no-interaction diff --git a/recipes/php-8.2-swoole.yml b/recipes/php-8.2-swoole.yml new file mode 100644 index 00000000..f6143939 --- /dev/null +++ b/recipes/php-8.2-swoole.yml @@ -0,0 +1,8 @@ +title: "PHP 8.2 + Swoole" + +actions: + - merge: app/php82-swoole.yml + dst: docker-compose.yml + - scripts: + - kool docker kooldev/php:8.2-nginx-swoole composer require laravel/octane + - kool docker kooldev/php:8.2-nginx-swoole php artisan octane:install --server=swoole diff --git a/templates/app/php81-roadrunner.yml b/templates/app/php82-roadrunner.yml similarity index 90% rename from templates/app/php81-roadrunner.yml rename to templates/app/php82-roadrunner.yml index 1772b39f..76dc3abc 100644 --- a/templates/app/php81-roadrunner.yml +++ b/templates/app/php82-roadrunner.yml @@ -1,6 +1,6 @@ services: app: - image: kooldev/php:8.1-nginx + image: kooldev/php:8.2-nginx command: php artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=80 ports: - "${KOOL_APP_PORT:-80}:80" diff --git a/templates/app/php81-swoole.yml b/templates/app/php82-swoole.yml similarity index 88% rename from templates/app/php81-swoole.yml rename to templates/app/php82-swoole.yml index b171abfb..553903d2 100644 --- a/templates/app/php81-swoole.yml +++ b/templates/app/php82-swoole.yml @@ -1,6 +1,6 @@ services: app: - image: kooldev/php:8.1-nginx-swoole + image: kooldev/php:8.2-nginx-swoole command: php artisan octane:start --server=swoole --host=0.0.0.0 --port=80 ports: - "${KOOL_APP_PORT:-80}:80" From c212339a65a8adec462ada7a4dfa06615d0cc4f0 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Sun, 22 Oct 2023 22:27:45 -0300 Subject: [PATCH 2/3] fix laravel octane dev mode - watching file changes --- presets/laravel+octane/config.yml | 9 +++++++-- templates/app/php82-roadrunner.yml | 2 +- templates/app/php82-swoole.yml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/presets/laravel+octane/config.yml b/presets/laravel+octane/config.yml index 27c3aca7..59f1f5db 100644 --- a/presets/laravel+octane/config.yml +++ b/presets/laravel+octane/config.yml @@ -47,8 +47,13 @@ preset: dst: kool.yml - recipe: php-8.2-roadrunner - - name: 'Customize Database, Cache and Node Package Manager' + - name: 'Use NPM and install dependencies' + actions: + - recipe: npm-laravel + - scripts: + - kool run npm install --save-dev chokidar + + - name: 'Customize Database and Cache' actions: - recipe: pick-db - recipe: pick-cache - - recipe: pick-laravel-node diff --git a/templates/app/php82-roadrunner.yml b/templates/app/php82-roadrunner.yml index 76dc3abc..7f83dae5 100644 --- a/templates/app/php82-roadrunner.yml +++ b/templates/app/php82-roadrunner.yml @@ -1,7 +1,7 @@ services: app: image: kooldev/php:8.2-nginx - command: php artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=80 + command: php artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=80 --watch --poll ports: - "${KOOL_APP_PORT:-80}:80" environment: diff --git a/templates/app/php82-swoole.yml b/templates/app/php82-swoole.yml index 553903d2..bb0a9f0b 100644 --- a/templates/app/php82-swoole.yml +++ b/templates/app/php82-swoole.yml @@ -1,7 +1,7 @@ services: app: image: kooldev/php:8.2-nginx-swoole - command: php artisan octane:start --server=swoole --host=0.0.0.0 --port=80 + command: php artisan octane:start --server=swoole --host=0.0.0.0 --port=80 --watch --poll ports: - "${KOOL_APP_PORT:-80}:80" environment: From 4da1d22d266d724e3359abbe4c2ba1ad0a9d7106 Mon Sep 17 00:00:00 2001 From: fabriciojs Date: Tue, 24 Oct 2023 00:23:13 -0300 Subject: [PATCH 3/3] use 8.2-node images --- presets/laravel+octane/config.yml | 9 ++++----- recipes/php-8.2-roadrunner.yml | 4 ++-- recipes/php-8.2-swoole.yml | 4 ++-- templates/app/php82-roadrunner.yml | 2 +- templates/app/php82-swoole.yml | 2 +- templates/scripts/laravel+octane+roadrunner.yml | 4 ++-- templates/scripts/laravel+octane+swoole.yml | 4 ++-- 7 files changed, 14 insertions(+), 15 deletions(-) diff --git a/presets/laravel+octane/config.yml b/presets/laravel+octane/config.yml index 59f1f5db..107b23b2 100644 --- a/presets/laravel+octane/config.yml +++ b/presets/laravel+octane/config.yml @@ -13,14 +13,13 @@ create: - name: 'Swoole' actions: - scripts: - - docker pull -q kooldev/php:8.2-nginx - - docker pull -q kooldev/php:8.2-nginx-swoole - - kool docker kooldev/php:8.2-nginx-swoole composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY + - docker pull -q kooldev/php:8.2-swoole + - kool docker kooldev/php:8.2-swoole composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY - name: 'RoadRunner' actions: - scripts: - - docker pull -q kooldev/php:8.2-nginx - - kool docker kooldev/php:8.2-nginx composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY + - docker pull -q kooldev/php:8.2-node + - kool docker kooldev/php:8.2-node composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY # Preset defines the workflow for installing this preset in the current working directory preset: diff --git a/recipes/php-8.2-roadrunner.yml b/recipes/php-8.2-roadrunner.yml index f16fdb0a..9084e3f4 100644 --- a/recipes/php-8.2-roadrunner.yml +++ b/recipes/php-8.2-roadrunner.yml @@ -4,5 +4,5 @@ actions: - merge: app/php82-roadrunner.yml dst: docker-compose.yml - scripts: - - kool docker kooldev/php:8.2-nginx composer require laravel/octane spiral/roadrunner spiral/roadrunner-http spiral/roadrunner-cli - - kool docker kooldev/php:8.2-nginx php artisan octane:install --server=roadrunner --no-interaction + - kool docker kooldev/php:8.2-node composer require laravel/octane spiral/roadrunner spiral/roadrunner-http spiral/roadrunner-cli + - kool docker kooldev/php:8.2-node php artisan octane:install --server=roadrunner --no-interaction diff --git a/recipes/php-8.2-swoole.yml b/recipes/php-8.2-swoole.yml index f6143939..4e626b8b 100644 --- a/recipes/php-8.2-swoole.yml +++ b/recipes/php-8.2-swoole.yml @@ -4,5 +4,5 @@ actions: - merge: app/php82-swoole.yml dst: docker-compose.yml - scripts: - - kool docker kooldev/php:8.2-nginx-swoole composer require laravel/octane - - kool docker kooldev/php:8.2-nginx-swoole php artisan octane:install --server=swoole + - kool docker kooldev/php:8.2-swoole composer require laravel/octane + - kool docker kooldev/php:8.2-swoole php artisan octane:install --server=swoole diff --git a/templates/app/php82-roadrunner.yml b/templates/app/php82-roadrunner.yml index 7f83dae5..02243ef8 100644 --- a/templates/app/php82-roadrunner.yml +++ b/templates/app/php82-roadrunner.yml @@ -1,6 +1,6 @@ services: app: - image: kooldev/php:8.2-nginx + image: kooldev/php:8.2-node command: php artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=80 --watch --poll ports: - "${KOOL_APP_PORT:-80}:80" diff --git a/templates/app/php82-swoole.yml b/templates/app/php82-swoole.yml index bb0a9f0b..f6a7cd56 100644 --- a/templates/app/php82-swoole.yml +++ b/templates/app/php82-swoole.yml @@ -1,6 +1,6 @@ services: app: - image: kooldev/php:8.2-nginx-swoole + image: kooldev/php:8.2-swoole command: php artisan octane:start --server=swoole --host=0.0.0.0 --port=80 --watch --poll ports: - "${KOOL_APP_PORT:-80}:80" diff --git a/templates/scripts/laravel+octane+roadrunner.yml b/templates/scripts/laravel+octane+roadrunner.yml index 00a8e51e..1e6c0f2b 100644 --- a/templates/scripts/laravel+octane+roadrunner.yml +++ b/templates/scripts/laravel+octane+roadrunner.yml @@ -13,5 +13,5 @@ scripts: before-start: - kool docker kooldev/bash -c "cp .env.example .env" - - kool docker kooldev/php:8.1-nginx composer install - - kool docker kooldev/php:8.1-nginx php artisan key:generate + - kool docker kooldev/php:8.2-node composer install + - kool docker kooldev/php:8.2-node php artisan key:generate diff --git a/templates/scripts/laravel+octane+swoole.yml b/templates/scripts/laravel+octane+swoole.yml index 88bbbbe2..46eaba98 100644 --- a/templates/scripts/laravel+octane+swoole.yml +++ b/templates/scripts/laravel+octane+swoole.yml @@ -13,5 +13,5 @@ scripts: before-start: - kool docker kooldev/bash -c "cp .env.example .env" - - kool docker kooldev/php:8.1-nginx-swoole composer install - - kool docker kooldev/php:8.1-nginx-swoole php artisan key:generate + - kool docker kooldev/php:8.2-swoole composer install + - kool docker kooldev/php:8.2-swoole php artisan key:generate