{"id":23588043,"url":"https://github.com/zeropsio/recipe-symfony","last_synced_at":"2025-11-03T17:30:22.424Z","repository":{"id":265475110,"uuid":"866052613","full_name":"zeropsio/recipe-symfony","owner":"zeropsio","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-03T10:40:39.000Z","size":976,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T19:49:01.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/zeropsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2024-10-01T15:08:52.000Z","updated_at":"2024-11-18T16:27:05.000Z","dependencies_parsed_at":"2024-11-29T15:04:33.152Z","dependency_job_id":"2fbdf2d7-f161-49dd-a59e-a2b58cb86500","html_url":"https://github.com/zeropsio/recipe-symfony","commit_stats":null,"previous_names":["zeropsio/recipe-symfony"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-symfony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-symfony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-symfony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-symfony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-symfony/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239418547,"owners_count":19635203,"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":[],"created_at":"2024-12-27T05:11:15.556Z","updated_at":"2025-11-03T17:30:22.393Z","avatar_url":"https://github.com/zeropsio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zerops x Symfony\n\n[Symfony Demo](https://github.com/symfony/demo) is a demo web application based on Symfony Framework, Twig and Doctrine libraries.  \n[Zerops](https://zerops.io) recipe for Symfony Demo app includes sessions stored in Redis, and PostgreSQL DB with doctrine migrations.\n\n![symfony](https://raw.githubusercontent.com/zeropsio/recipe-shared-assets/main/covers/svg/cover-symfony.svg)\n\n\u003cbr/\u003e\n\n## Deploy on Zerops\nYou can either click the deploy button to deploy directly on Zerops, or manually copy the [import yaml](https://github.com/zeropsio/recipe-symfony/blob/main/zerops-project-import.yml) to the import dialog in the Zerops app.\n\n[![Deploy on Zerops](https://raw.githubusercontent.com/zeropsio/recipe-shared-assets/main/deploy-button/green/deploy-button.svg)](https://app.zerops.io/recipe/symfony)\n\n\u003cbr/\u003e\n\n## Recipe features\n\n- Symfony running on a load balanced **Zerops PHP + Nginx** service\n- Zerops **PostgreSQL 16** service as database\n- Zerops KeyDB (**Redis**) service for session storage\n- Setup for Doctrine **database migrations**\n- Logs set up to use **syslog** and accessible through Zerops GUI\n- Utilization of Zerops built-in **environment variables** system\n- [Mailpit](https://github.com/axllent/mailpit) as **SMTP mock server**\n- [AdminerEvo](https://www.adminerevo.org) for **quick database management** tool\n\n\u003cbr/\u003e\n\n## Production vs. development\n\nBase of the recipe is ready for production, the difference comes down to:\n\n- Use highly available version of the PostgreSQL database (change `mode` from `NON_HA` to `HA` in recipe YAML, `db` service section)\n- Use at least two containers for Symfony service to achieve high reliability and resilience (add `minContainers: 2` in recipe YAML, `app` service section)\n- Use production-ready third-party SMTP server instead of Mailpit (change `MAILER_DSN` env variable in `./zerops.yml` file)\n- Disable public access to Adminer or remove it altogether (remove service `adminer` from recipe YAML)\n\n\u003cbr/\u003e\n\n## Changes made over the default installation\n\nIf you want to modify your existing Symfony app to efficiently run on Zerops, these are the general steps we took:\n\n- Add [zerops.yml](https://github.com/zeropsio/recipe-symfony/blob/main/zerops.yml) to your repository, our example includes idempotent migrations, caching, and optimized build process\n- Add [marein/symfony-lock-doctrine-migrations-bundle](https://github.com/marein/symfony-lock-doctrine-migrations-bundle) to your composer.json to enable safe migrations in containerized deployments\n- Setup `monolog.syslog_handler` to see logs in Zerops (see our [./config/packages/monolog.yaml](https://github.com/zeropsio/recipe-symfony/blob/main/config/packages/monolog.yaml#L63))\n- Setup `session.handler_id` to store sessions inside Redis  (see our [./config/packages/framework.yaml](https://github.com/zeropsio/recipe-symfony/blob/main/config/packages/framework.yaml#L16), we specifically use DB with index `0`)\n- We had to move `twbs/bootstrap` from `require-dev` to `require` in composer section for `composer install --no-dev` to work\n- We also had to update `symfonycasts/sass-bundle` to `v0.5` or newer for sass compilation to work on alpine linux\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\nNeed help setting your project up? Join [Zerops Discord community](https://discord.com/invite/WDvCZ54).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-symfony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-symfony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-symfony/lists"}