{"id":13617871,"url":"https://github.com/zanbaldwin/runtime-playground","last_synced_at":"2025-04-10T18:15:54.378Z","repository":{"id":136808658,"uuid":"373141873","full_name":"zanbaldwin/runtime-playground","owner":"zanbaldwin","description":"Demo of a new project using the new Runtime Symfony component (PHP-FPM, RoadRunner, and Swoole).","archived":false,"fork":false,"pushed_at":"2021-06-02T15:54:21.000Z","size":46,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-24T15:52:35.268Z","etag":null,"topics":["component","php","runtime","symfony"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/zanbaldwin.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}},"created_at":"2021-06-02T11:23:43.000Z","updated_at":"2022-12-25T16:37:48.000Z","dependencies_parsed_at":"2024-01-22T00:17:25.938Z","dependency_job_id":"2f4e202f-0917-47c6-9f57-e8edc914b612","html_url":"https://github.com/zanbaldwin/runtime-playground","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/zanbaldwin%2Fruntime-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanbaldwin%2Fruntime-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanbaldwin%2Fruntime-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zanbaldwin%2Fruntime-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zanbaldwin","download_url":"https://codeload.github.com/zanbaldwin/runtime-playground/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248269693,"owners_count":21075784,"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":["component","php","runtime","symfony"],"created_at":"2024-08-01T20:01:49.684Z","updated_at":"2025-04-10T18:15:54.361Z","avatar_url":"https://github.com/zanbaldwin.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# This Project\n\nThis is a working example of Symfony's Runtime component.\nDo not use this project, look through the code and pull out the parts you find interesting. Copy+paste is your friend.\n\n## Contains:\n\n- Symfony v5.3 skeleton,\n- Docker Stack for both FPM, Swoole and RoadRunner, and\n- A handy Makefile for the SSL stuff.\n\n## How?\n\nDepending on the Docker build target (`fpm`, `swoole`, or `roadrunner`) the PHP container does the following:\n\n- For build target `fpm`:\n  - Execute `php-fpm --nodaemonize`\n  - `APP_RUNTIME` is set to `Symfony\\Component\\Runtime\\SymfonyRuntime`\n- For build target `swoole`:\n  - Execute `php \"\u003cproject-dir\u003e/public/index.php\"`\n  - `APP_RUNTIME` is set to `Runtime\\Swoole\\Runtime`\n  - Environment variables `SWOOLE_HOST` and `SWOOLE_PORT` are set.\n- For build target `roadrunner`\n  - Execute `/sbin/rr serve`\n  - `APP_RUNTIME` is set to `Runtime\\RoadRunnerSymfonyNyholm\\Runtime`\n  - `.rr.yaml` configuration file is created\n  \nIn the Nginx container, build target `fpm` uses FastCGI, while build targets `swoole` and `roadrunner` use Reverse Proxy.\n\n## Setup Locally\n\n- You will need [`git`](https://git-scm.com/), [`openssl`](https://www.openssl.org/),\n  [`make`](https://www.gnu.org/software/make/), and [`mkcert`](https://mkcert.dev/).\n- Update values in `.env` (choose `fpm`, `swoole` or `roadrunner` for `${RUNTIME}`).\n- `docker-compose build --pull`\n- `make password`\n- `make mock-ssl`\n- `composer install` (or `bin/env composer install` to run it inside the PHP container)\n- `docker-compose up -d`\n- `mkcert -install`\n- Go to `https://${DOMAIN}:${SSL_PORT}`\n\n## Production\n\nYou probably shouldn't use this for production, but if you did:\n\n- `sudo mkdir -p \"/etc/letsencrypt/challenges\"`\n- `docker-compose -f \"docker-compose.yaml\" run -d --name \"acme\" server nginx -c \"/etc/nginx/acme.conf\"`\n- `sudo certbot certonly --webroot --webroot-path=\"/etc/letsencrypt/challenges\" --cert-name=\"docker\" -d \"${YOUR_DOMAIN}\"`\n- `sudo openssl dhparam -out \"/etc/letsencrypt/dhparam.pem\" 4096`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanbaldwin%2Fruntime-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzanbaldwin%2Fruntime-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzanbaldwin%2Fruntime-playground/lists"}