Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octane tweaks - dev watch/polling mode #477

Merged
merged 3 commits into from
Oct 27, 2023
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
22 changes: 13 additions & 9 deletions presets/laravel+octane/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ 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-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.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-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:
Expand All @@ -40,15 +39,20 @@ 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'
- 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
8 changes: 0 additions & 8 deletions recipes/php-8.1-roadrunner.yml

This file was deleted.

8 changes: 0 additions & 8 deletions recipes/php-8.1-swoole.yml

This file was deleted.

8 changes: 8 additions & 0 deletions recipes/php-8.2-roadrunner.yml
Original file line number Diff line number Diff line change
@@ -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-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
8 changes: 8 additions & 0 deletions recipes/php-8.2-swoole.yml
Original file line number Diff line number Diff line change
@@ -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-swoole composer require laravel/octane
- kool docker kooldev/php:8.2-swoole php artisan octane:install --server=swoole
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
app:
image: kooldev/php:8.1-nginx
command: php artisan octane:start --server=roadrunner --host=0.0.0.0 --rpc-port=6001 --port=80
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"
environment:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
app:
image: kooldev/php:8.1-nginx-swoole
command: php artisan octane:start --server=swoole --host=0.0.0.0 --port=80
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"
environment:
Expand Down
4 changes: 2 additions & 2 deletions templates/scripts/laravel+octane+roadrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions templates/scripts/laravel+octane+swoole.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading