From 76b73f5231caad2e2ccb7f07084ce956cfc02b6c Mon Sep 17 00:00:00 2001 From: COil Date: Thu, 7 Mar 2024 18:16:56 +0100 Subject: [PATCH] docs: added installation notes for FrankenPHP --- README.md | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c15b87..50c8f57 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,20 @@ Because a live demo is always better than all explanations. Here is it: * Live demo at [https://microsymfony.ovh](https://microsymfony.ovh) -## Quick-start 🐰 +## Quick-start with the Symfony binary 🎶 -Run +You must have the [Symfony binary](https://symfony.com/download#step-1-install-symfony-cli) installed locally. + +To create a new project from the GitHub template, run: composer create-project strangebuzz/microsymfony cd microsymfony -then +Then start the PHP server with make: make start -or +Or with Castor: castor symfony:start @@ -44,6 +46,32 @@ Open [https://127.0.0.1:8000](https://127.0.0.1:8000) (considering your 8000 por Enjoy! 🙂 +### FrankenPHP 🧟‍ + +We can also use [FrankenPHP](https://frankenphp.dev/) to run MicroSymfony: +Create a new project from the GitHub template, run: + + composer create-project strangebuzz/microsymfony + cd microsymfony + +Install the [FrankenPHP Symfony runtime](https://github.com/php-runtime/frankenphp-symfony): + + composer require runtime/frankenphp-symfony + +Then run: + + docker run \ + -e FRANKENPHP_CONFIG="worker ./public/index.php" \ + -e APP_RUNTIME=Runtime\\FrankenPhpSymfony\\Runtime \ + -v $PWD:/app \ + -p 80:80 -p 443:443 \ + dunglas/frankenphp + +Open [https://localhost](https://localhost) + +Enjoy! 🙂 + + ## Requirements ⚙ * [PHP 8.2](https://www.php.net/releases/8.2/en.php) (also works with [PHP 8.3](https://github.com/strangebuzz/MicroSymfony/actions/workflows/symfony.yml))