{"id":16780377,"url":"https://github.com/patrickjahns/nuclio-php-runtime","last_synced_at":"2025-03-16T20:13:24.916Z","repository":{"id":76944597,"uuid":"174822117","full_name":"patrickjahns/nuclio-php-runtime","owner":"patrickjahns","description":"Runtime for php applications in https://nuclio.io/","archived":false,"fork":false,"pushed_at":"2019-03-11T18:22:29.000Z","size":14,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T08:59:10.614Z","etag":null,"topics":["faas","nuclio","php","serverless"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patrickjahns.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-03-10T12:43:08.000Z","updated_at":"2023-09-19T06:40:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d080f2e8-b4f1-4504-b5a7-682afec71e61","html_url":"https://github.com/patrickjahns/nuclio-php-runtime","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/patrickjahns%2Fnuclio-php-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjahns%2Fnuclio-php-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjahns%2Fnuclio-php-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickjahns%2Fnuclio-php-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickjahns","download_url":"https://codeload.github.com/patrickjahns/nuclio-php-runtime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926071,"owners_count":20369910,"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":["faas","nuclio","php","serverless"],"created_at":"2024-10-13T07:34:59.798Z","updated_at":"2025-03-16T20:13:24.894Z","avatar_url":"https://github.com/patrickjahns.png","language":"Go","readme":"# nuclio-php-runtime\nRuntime for php applications in [nuclio](https://nuclio.io/)\n\nThis repository provides a small shim written in golang, which forwards a [nuclio event](https://github.com/nuclio/nuclio-sdk-go/blob/master/event.go) via fcgi to `php-fpm` through a unix socket.\n\n### How does it work\n\nOn the first request (coldstart) received by the function a php-fpm server will be started.\n  The php-fpm server is configured to listen on a linux socket ( `/var/task/fpm.sock`).\n  The request will be forwarded to fpm via the socket and the response will be returned to the clients\n  \nSubsequent request to the function will profit from the already running `php-fpm` server and handle requests faster.\n\n### Configuration \u0026 Caveats\n\nThe current version is opinionated:\n\n- Per default we assume that a central php script is provided which all requests will be handled (it is responsible for application internal routing).\n  The script can be defined in the `Dockerfile` (`PHP_SCRIPT`) or later via the environment vars in the nuclio interface\n- It assumes that the working directory of the function is `/var/task` - thus the fpm configuration file as well as the source code is put there\n- The `Dockerfile` utilizes the standard `php:fpm` container as the basis and adds the nuclio specific options. If you use a different container, please ensure you set `PHP_FPM_BIN` to the correct path.\n\n\n\n### Example\n\nThe repository contains a example `Dockerfile` on how to utilize the handler.\nIt can easily be deployed by building the docker image via:\n\n```\ncd example \u0026\u0026 docker build -t nuclio-php-example:latest\n```\n\nOnce it is build, it can be deployed with the following nuclio configuration\n\n```\napiVersion: \"nuclio.io/v1\"\nkind: NuclioFunction\nmetadata:\n  name: php-example\nspec:\n  image: nuclio-php-example:latest\n  handler: main:Handler\n  runtime: golang\n```\n\nFor more information on deploying functions via Dockerfiles please refer to the nuclio documentation:\n- https://nuclio.io/docs/latest/tasks/deploy-functions-from-dockerfile/\n- https://nuclio.io/docs/latest/tasks/deploying-pre-built-functions/\n\nThere is also a [demo project](https://github.com/patrickjahns/nuclio-symfony) utilizing the symfony framework\n\n\n### Other Projects\n- [bref.sh](https://bref.sh/)\n  PHP Runtime for AWS Lambda\n\n\n### Authors\n\n* [Patrick Jahns](https://github.com/patrickjahns)\n\n\n### License\n\nApache\n\n\n### Copyright\n\n```\nCopyright (c) 2019 Patrick Jahns \n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjahns%2Fnuclio-php-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickjahns%2Fnuclio-php-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickjahns%2Fnuclio-php-runtime/lists"}