a very simple high performance PHP application server and php-fpm supervisor
modern php application server, it depends on the bullet-proof
php-fpm
but it controls how it is being run.
Imagine you have a php application that uses a modern framework like laravel, Symfony... etc that app contains a public directory, and that public directory contains the main bootstrap file that serves the incoming requests named
index.php
.
# this is all that you need to serve a laravel application!
$ phoo serve -r ./public
⇨ http server started on [::]:8000
# no problem
$ phoo serve -r ./public --http 0.0.0.0:80
⇨ http server started on [::]:80
php.ini
settings, is it easy?# is this ok for you? ;)
$ phoo serve -r ./public -i display_errors=Off -i another_key=another_value
⇨ http server started on [::]:8000
# increase the workers' count
$ phoo serve -r ./public --workers=20
⇨ http server started on [::]:8000
# no need to do it yourself, this will enable Prometheus metrics at the specified `/metrics` path
$ phoo serve -r ./public --metrics "/metrics"
⇨ http server started on [::]:8000
php-fpm
version / binary path?# Of course
$ phoo serve -r ./public --fpm "php-fpm8.2"
⇨ http server started on [::]:8000
phoo
has a lot of simple flags/configs, is it documented anywhere?Just run
phoo serve --help
and enjoy it :), you will find that you can also pass flags viaENV
vars, and it will automatically read the.env
file in the current working directory.
php-fpm
phoo
:Dghcr.io/alash3al/phoo
COPY --from=ghcr.io/alash3al/phoo:2.1.8 /usr/bin/phoo /usr/bin/phoo
to run it into your own custom image!.env.example
with comments to describe each var.