{"id":15634890,"url":"https://github.com/dunglas/frankenphp-demo","last_synced_at":"2025-04-13T09:44:58.892Z","repository":{"id":61497054,"uuid":"551402943","full_name":"dunglas/frankenphp-demo","owner":"dunglas","description":"Demo app for FrankenPHP","archived":false,"fork":false,"pushed_at":"2024-07-02T21:16:08.000Z","size":155,"stargazers_count":164,"open_issues_count":3,"forks_count":18,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T01:11:47.714Z","etag":null,"topics":["api-platform","frankenphp","golang","php","symfony"],"latest_commit_sha":null,"homepage":"https://frankenphp.dev","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dunglas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"dunglas"}},"created_at":"2022-10-14T10:34:16.000Z","updated_at":"2025-03-06T19:37:30.000Z","dependencies_parsed_at":"2023-01-22T20:15:09.299Z","dependency_job_id":"13ea5d36-a652-4adf-925f-f37edb9d9e5b","html_url":"https://github.com/dunglas/frankenphp-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Ffrankenphp-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Ffrankenphp-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Ffrankenphp-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunglas%2Ffrankenphp-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunglas","download_url":"https://codeload.github.com/dunglas/frankenphp-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248694190,"owners_count":21146945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-platform","frankenphp","golang","php","symfony"],"created_at":"2024-10-03T10:58:44.379Z","updated_at":"2025-04-13T09:44:58.863Z","avatar_url":"https://github.com/dunglas.png","language":"HTML","funding_links":["https://github.com/sponsors/dunglas"],"categories":[],"sub_categories":[],"readme":"# FrankenPHP Demo\n\nA demo app using [FrankenPHP](https://frankenphp.dev) that uses\nSymfony and API Platform.\n\n## Installation\n\n### Composer\n\nInstall composer dependencies:\n\n```console\ndocker run --rm -it -v $PWD:/app composer:latest install\n```\n\nOr if you have composer installed locally:\n\n```console\ncomposer install\n```\n\n### The project\n\nRun the project with Docker (worker mode):\n\n```console\ndocker run \\\n    -e FRANKENPHP_CONFIG=\"worker ./public/index.php\" \\\n    -v $PWD:/app \\\n    -p 80:80 -p 443:443/tcp -p 443:443/udp \\\n    --name FrankenPHP-demo \\\n    dunglas/frankenphp\n```\n\n**PS**: Docker is optional; you can also compile\n[FrankenPHP](https://github.com/dunglas/frankenphp/blob/main/docs/compile.md)\nby yourself.\n\nCreate the database (It uses a local SQLite database stored in `var/data.db`):\n\n```console\ndocker exec -it FrankenPHP-demo php bin/console doctrine:migrations:migrate --no-interaction\n```\n\nThen you can access the application:\n\n* [Hello world page](https://localhost)\n* [API Platform](https://localhost/api)\n* [API Platform: collection of monsters (GET/JSON-LD)](https://localhost/api/monsters.jsonld)\n\nThis demo is a standard Symfony application and works without FrankenPHP.\nTherefore, you can serve it with the Symfony CLI:\n\n```console\nsymfony serve\n```\n\nThe repository also includes [a benchmark](benchmark) comparing FrankenPHP and PHP-FPM.\n\n## Package as a Standalone Binary\n\nThe demo app can be packaged as a self-contained binary containing\nthe Symfony app, FrankenPHP and the PHP extensions used by the app.\n\nTo do so, the easiest way is to use the provided `Dockerfile`:\n\n```console\ndocker build -t static-app -f static-build.Dockerfile .\ndocker cp $(docker create --name static-app-tmp static-app):/go/src/app/dist/frankenphp-linux-x86_64 frankenphp-demo ; docker rm static-app-tmp\n```\n\nThe resulting binary is the `frankenphp-demo` file in the current directory.\nIt can be started with the following commands:\n\n```console\nchmod +x ./frankenphp-demo\n./frankenphp-demo php-server\n```\n\nIt's also possible to run commands with `./frankenphp-demo php-cli bin/console`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunglas%2Ffrankenphp-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunglas%2Ffrankenphp-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunglas%2Ffrankenphp-demo/lists"}