https://github.com/alash3al/phoo
a very simple high performance PHP application server and php-fpm supervisor
https://github.com/alash3al/phoo
application-server golang php php-fpm php-server
Last synced: 5 months ago
JSON representation
a very simple high performance PHP application server and php-fpm supervisor
- Host: GitHub
- URL: https://github.com/alash3al/phoo
- Owner: alash3al
- Created: 2018-04-28T23:28:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T17:41:21.000Z (almost 2 years ago)
- Last Synced: 2025-03-30T10:33:21.756Z (12 months ago)
- Topics: application-server, golang, php, php-fpm, php-server
- Language: Go
- Homepage:
- Size: 72.3 KB
- Stars: 71
- Watchers: 8
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHOO
====
> modern php application server, it depends on the bullet-proof `php-fpm` but it controls how it is being run.
Examples
========
> 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`.
```shell
# this is all that you need to serve a laravel application!
$ phoo serve -r ./public
⇨ http server started on [::]:8000
```
#### But how about changing the address it is listening on to 0.0.0.0:80?
```shell
# no problem
$ phoo serve -r ./public --http 0.0.0.0:80
⇨ http server started on [::]:80
```
#### Sometimes I want to add custom `php.ini` settings, is it easy?
```shell
# is this ok for you? ;)
$ phoo serve -r ./public -i display_errors=Off -i another_key=another_value
⇨ http server started on [::]:8000
```
#### I have a high traffic web app and I want to increase the number of php workers
```shell
# increase the workers' count
$ phoo serve -r ./public --workers=20
⇨ http server started on [::]:8000
```
#### Hmmmm, but I want to monitor my app via Prometheus metrics, I don't want to do it manually
```shell
# 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
```
#### Can I choose the `php-fpm` version / binary path?
```shell
# Of course
$ phoo serve -r ./public --fpm "php-fpm8.2"
⇨ http server started on [::]:8000
```
#### Wow!, it seems `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 via `ENV` vars, and it will automatically read the `.env` file in the current working directory.
Requirements
============
- `php-fpm`
- a shell access to run `phoo` :D
Installation
============
- Binary installations could be done via the [releases](https://github.com/alash3al/phoo/releases).
- Docker image is available at [`ghcr.io/alash3al/phoo`](https://github.com/alash3al/phoo/pkgs/container/phoo)
- you can easily `COPY --from=ghcr.io/alash3al/phoo:2.1.8 /usr/bin/phoo /usr/bin/phoo` to run it into your own custom image!
TODOs
=====
- [x] Add `.env.example` with comments to describe each var.
- [ ] Add future plans/thoughts.