Rob Landers 5d43fc2c8d add basic metrics (#966)
* add metrics

* change how counting works

* also replace dots

* check that metrics exist

* rename NullMetrics to nullMetrics

* update go.sum

* register collectors only once

* add tests

* add tests for metrics and fix bugs

* keep old metrics around for test

* properly reset during shutdown

* use the same method as frankenphp

* Revert "keep old metrics around for test"

This reverts commit 1f0df6f6bdaebf32aec346f068d6f42a0b5f4007.

* change to require.NoError

* compile regex only once

* remove name sanitizer

* use require

* parameterize host port because security software sucks

* remove need for renaming workers

* increase number of threads and add tests

* fix where frankenphp configuration was bleeding into later tests

* adds basic docs for metrics

* Add caddy metrics link

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>

* Fix typos

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>

* address feedback

* change comment to be much more "dangerous"

---------

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
2024-09-26 09:53:37 +02:00
2024-08-20 01:36:26 +02:00
2024-09-26 09:53:37 +02:00
2024-09-26 09:53:37 +02:00
2023-12-01 17:26:21 +01:00
2023-12-03 19:17:36 +01:00
2024-09-26 09:53:37 +02:00
2022-10-14 12:23:39 +02:00
2024-09-26 09:53:37 +02:00
2024-09-26 09:53:37 +02:00
2022-10-15 11:21:21 +02:00
2024-09-26 09:53:37 +02:00
2024-09-26 09:53:37 +02:00
2024-09-26 09:53:37 +02:00
2024-08-13 16:08:59 +02:00
2023-12-28 00:16:19 +01:00
2024-09-26 09:53:37 +02:00

FrankenPHP: Modern App Server for PHP

FrankenPHP

FrankenPHP is a modern application server for PHP built on top of the Caddy web server.

FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: Early Hints, worker mode, real-time capabilities, automatic HTTPS, HTTP/2, and HTTP/3 support...

FrankenPHP works with any PHP app and makes your Laravel and Symfony projects faster than ever thanks to their official integrations with the worker mode.

FrankenPHP can also be used as a standalone Go library to embed PHP in any app using net/http.

Learn more on frankenphp.dev and in this slide deck:

Slides

Getting Started

Docker

docker run -v $PWD:/app/public \
    -p 80:80 -p 443:443 -p 443:443/udp \
    dunglas/frankenphp

Go to https://localhost, and enjoy!

Tip

Do not attempt to use https://127.0.0.1. Use https://localhost and accept the self-signed certificate. Use the SERVER_NAME environment variable to change the domain to use.

Standalone Binary

If you prefer not to use Docker, we provide standalone FrankenPHP binaries for Linux and macOS containing PHP 8.3 and most popular PHP extensions: Download FrankenPHP

To serve the content of the current directory, run:

./frankenphp php-server

You can also run command-line scripts with:

./frankenphp php-cli /path/to/your/script.php

Docs

Examples and Skeletons

Description
现代 PHP 应用程序服务器
Readme MIT 44 MiB
Languages
Go 77.3%
PHP 9.3%
C 5.9%
Shell 2.5%
Dockerfile 2.4%
Other 2.6%