{"id":23588051,"url":"https://github.com/zeropsio/recipe-nette-contributte","last_synced_at":"2025-11-03T17:30:22.890Z","repository":{"id":265475096,"uuid":"821387552","full_name":"zeropsio/recipe-nette-contributte","owner":"zeropsio","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-04T14:37:25.000Z","size":1968,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T19:49:00.560Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeropsio.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":"2024-06-28T12:30:31.000Z","updated_at":"2024-12-04T14:40:08.000Z","dependencies_parsed_at":"2024-11-29T15:04:50.680Z","dependency_job_id":"a39e0abc-293b-4550-a553-57392ddb16e7","html_url":"https://github.com/zeropsio/recipe-nette-contributte","commit_stats":null,"previous_names":["zeropsio/recipe-nette-contributte"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette-contributte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette-contributte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette-contributte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette-contributte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-nette-contributte/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:16.994Z","updated_at":"2025-11-03T17:30:22.832Z","avatar_url":"https://github.com/zeropsio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zerops x Nette + Contributte\n\n[Nette Contributte](https://github.com/contributte/webapp-skeleton) is a web application skeleton based on Nette Framework, Doctrine and Contributte libraries.\n[Zerops](https://zerops.io) recipe for Contributte skeleton includes session and cache stored in Redis, and PostgreSQL DB with doctrine migrations.\n\n![nette contributte](https://raw.githubusercontent.com/zeropsio/recipe-shared-assets/main/covers/svg/cover-contributte.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-contributte/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/nette)\n\n\u003cbr/\u003e\n\n## Recipe features\n\n- Nette running on a load balanced **Zerops PHP + Nginx** service\n- Zerops **PostgreSQL 16** service as database\n- Zerops KeyDB (**Redis**) service for session and cache\n- Proper setup for Nettrine **cache**, **optimization**, and **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 Nette 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 `parameters.smtp` variables in `./config/app/parameters.neon` file)\n- Disable public access to Adminer or remove it altogether (remove service `adminer` from recipe YAML)\n- Set `NETTE_DEBUG` to `0` and `NETTE_ENV` to `prod` in `envSecrets`, `app` section of import YAML\n- Create `admin` user manually through `create-user` console command (in dev mode this is handled by fixtures) and\n  - remove following line from `zerops.yml`:\n    - `- zsc execOnce ${appVersionId}-fixtures -- php /var/www/bin/console doctrine:fixtures:load --no-interaction`\n  - add `--no-dev` to the following line in `zerops.yml`:\n    - `- composer install --optimize-autoloader`\n\n\u003cbr/\u003e\n\n## Changes made over the default installation\n\nIf you want to modify your existing Nette app to efficiently run on Zerops, these are the general steps we took:\n\n- Add [zerops.yml](https://github.com/zeropsio/recipe-contributte/blob/main/zerops.yml) to your repository, our example includes idempotent migrations, caching, and optimized build process\n- Add `$configurator-\u003eaddDynamicParameters(['env' =\u003e getenv()]);` to your [./app/Bootstrap.php](https://github.com/zeropsio/recipe-contributte/blob/main/app/Bootstrap.php:25) file to use env variables in your neon configuration files\n- Add [contributte/redis](https://github.com/contributte/redis) to your composer.json to store sessions in Redis\n  - configure it according to our [./config/env/base.neon](https://github.com/zeropsio/recipe-contributte/blob/main/config/env/base.neon#L55) file\n- Add [contributte/monolog](https://github.com/contributte/monolog) to your composer.json to log into the syslog\n  - utilize the following handler: `Monolog\\Handler\\SyslogHandler(app)` (see our [./config/ext/contributte.neon](https://github.com/MichalSalon/recipe-contributte/blob/main/config/ext/contributte.neon#L31))\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Additional info\n\nAdmin login for this recipe is `admin@admin.cz` with automatically generated password,\nwhich can be found under `ADMIN_PASSWORD` name in Zerops Environment variables section of `app` service.\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-nette-contributte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-nette-contributte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-nette-contributte/lists"}