Skip to content

Commit

Permalink
Merge pull request #492 from kool-dev/presets-updates
Browse files Browse the repository at this point in the history
PHP Presets tweaks + add php 8.3
  • Loading branch information
fabriciojs authored Jan 6, 2024
2 parents babd5fa + c81342a commit a1f9b2c
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 11 deletions.
4 changes: 1 addition & 3 deletions presets/codeigniter/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ name: 'CodeIgniter'
create:
- name: Creating new CodeIgniter Application
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
- recipe: create-codeigniter

# Preset defines the workflow for installing this preset in the current working directory
preset:
Expand Down
4 changes: 1 addition & 3 deletions presets/laravel/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ name: 'Laravel'
create:
- name: Creating new Laravel Application
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
- recipe: create-laravel

# Preset defines the workflow for installing this preset in the current working directory
preset:
Expand Down
4 changes: 1 addition & 3 deletions presets/symfony/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ name: 'Symfony'
create:
- name: Creating new Symfony Application
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
- recipe: create-symfony

# Preset defines the workflow for installing this preset in the current working directory
preset:
Expand Down
32 changes: 32 additions & 0 deletions recipes/create-codeigniter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: "Creating Laravel Application"

actions:
- prompt: 'Which PHP version do you want to use?'
ref: 'php-version'
default: 'PHP 8.2'
options:
- name: 'PHP 8.3'
actions:
- scripts:
- docker pull -q kooldev/php:8.3
- kool docker kooldev/php:8.3 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
- name: 'PHP 8.2'
actions:
- scripts:
- docker pull -q kooldev/php:8.2
- kool docker kooldev/php:8.2 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
- name: 'PHP 8.1'
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
- name: 'PHP 8.0'
actions:
- scripts:
- docker pull -q kooldev/php:8
- kool docker kooldev/php:p:8 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
- name: 'PHP 7.4'
actions:
- scripts:
- docker pull -q kooldev/php:7.4
- kool docker kooldev/php:7.4 composer create-project --no-install --no-scripts --prefer-dist codeigniter4/appstarter $CREATE_DIRECTORY
32 changes: 32 additions & 0 deletions recipes/create-laravel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: "Creating Laravel Application"

actions:
- prompt: 'Which PHP version do you want to use?'
ref: 'php-version'
default: 'PHP 8.2'
options:
- name: 'PHP 8.3'
actions:
- scripts:
- docker pull -q kooldev/php:8.3
- kool docker kooldev/php:8.3 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
- name: 'PHP 8.2'
actions:
- scripts:
- docker pull -q kooldev/php:8.2
- kool docker kooldev/php:8.2 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
- name: 'PHP 8.1'
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
- name: 'PHP 8.0'
actions:
- scripts:
- docker pull -q kooldev/php:8
- kool docker kooldev/php:8 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
- name: 'PHP 7.4'
actions:
- scripts:
- docker pull -q kooldev/php:7.4
- kool docker kooldev/php:7.4 composer create-project --no-install --no-scripts --prefer-dist laravel/laravel $CREATE_DIRECTORY
32 changes: 32 additions & 0 deletions recipes/create-symfony.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: "Creating Symfony Application"

actions:
- prompt: 'Which PHP version do you want to use?'
ref: 'php-version'
default: 'PHP 8.2'
options:
- name: 'PHP 8.3'
actions:
- scripts:
- docker pull -q kooldev/php:8.3
- kool docker kooldev/php:8.3 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
- name: 'PHP 8.2'
actions:
- scripts:
- docker pull -q kooldev/php:8.2
- kool docker kooldev/php:8.2 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
- name: 'PHP 8.1'
actions:
- scripts:
- docker pull -q kooldev/php:8.1
- kool docker kooldev/php:8.1 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
- name: 'PHP 8.0'
actions:
- scripts:
- docker pull -q kooldev/php:8
- kool docker kooldev/php:p:8 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
- name: 'PHP 7.4'
actions:
- scripts:
- docker pull -q kooldev/php:7.4
- kool docker kooldev/php:7.4 composer create-project --no-install --prefer-dist symfony/website-skeleton $CREATE_DIRECTORY
5 changes: 5 additions & 0 deletions recipes/php-8.3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: "PHP 8.3"

actions:
- merge: app/php83.yml
dst: docker-compose.yml
8 changes: 6 additions & 2 deletions recipes/pick-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ title: "Wizard: PHP"

actions:
# Defines which app service to use (PHP version)
- prompt: 'Which PHP version do you want to use'
default: 'PHP 8.1'
- prompt: 'Which PHP version do you want to use?'
ref: 'php-version'
default: 'PHP 8.2'
options:
- name: 'PHP 8.3'
actions:
- recipe: php-8.3
- name: 'PHP 8.2'
actions:
- recipe: php-8.2
Expand Down
13 changes: 13 additions & 0 deletions templates/app/php83.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
app:
image: kooldev/php:8.3-nginx
ports:
- "${KOOL_APP_PORT:-80}:80"
environment:
ASUSER: "${KOOL_ASUSER:-0}"
UID: "${UID:-0}"
volumes:
- .:/app:delegated
networks:
- kool_local
- kool_global

0 comments on commit a1f9b2c

Please sign in to comment.