Get support for dunglas/frankenphp-demo
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
dunglas/frankenphp-demo
FrankenPHP Demo
A demo app using FrankenPHP that uses Symfony and API Platform.
Installation
Composer
Install composer dependencies:
docker run --rm -it -v $PWD:/app composer:latest install
Or if you have composer installed locally:
composer install
The project
Run the project with Docker (worker mode):
docker run \
-e FRANKENPHP_CONFIG="worker ./public/index.php" \
-v $PWD:/app \
-p 80:80 -p 443:443/tcp -p 443:443/udp \
--name FrankenPHP-demo \
dunglas/frankenphp
PS: Docker is optional; you can also compile FrankenPHP by yourself.
Create the database (It uses a local SQLite database stored in var/data.db
):
docker exec -it FrankenPHP-demo php bin/console doctrine:migrations:migrate --no-interaction
Then you can access the application:
This demo is a standard Symfony application and works without FrankenPHP. Therefore, you can serve it with the Symfony CLI:
symfony serve
The repository also includes a benchmark comparing FrankenPHP and PHP-FPM.
Package as a Standalone Binary
The demo app can be packaged as a self-contained binary containing the Symfony app, FrankenPHP and the PHP extensions used by the app.
To do so, the easiest way is to use the provided Dockerfile
:
docker build -t static-app -f static-build.Dockerfile .
docker cp $(docker create --name static-app-tmp static-app):/go/src/app/dist/frankenphp-linux-x86_64 frankenphp-demo ; docker rm static-app-tmp
The resulting binary is the frankenphp-demo
file in the current directory.
It can be started with the following commands:
chmod +x ./frankenphp-demo
./frankenphp-demo php-server
It's also possible to run commands with ./frankenphp-demo php-cli bin/console
.
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2