{"id":21855583,"url":"https://github.com/zeropsio/recipe-nette","last_synced_at":"2025-04-14T18:11:49.604Z","repository":{"id":252229116,"uuid":"821394081","full_name":"zeropsio/recipe-nette","owner":"zeropsio","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-27T10:41:45.000Z","size":1719,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-27T11:55:36.030Z","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:47:51.000Z","updated_at":"2024-08-27T10:41:48.000Z","dependencies_parsed_at":"2024-11-10T17:15:33.685Z","dependency_job_id":null,"html_url":"https://github.com/zeropsio/recipe-nette","commit_stats":null,"previous_names":["zeropsio/recipe-nette"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeropsio%2Frecipe-nette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeropsio","download_url":"https://codeload.github.com/zeropsio/recipe-nette/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226846684,"owners_count":17691353,"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-11-28T02:16:27.390Z","updated_at":"2024-11-28T02:16:28.438Z","avatar_url":"https://github.com/zeropsio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zerops x Nette\n\n[Nette QuickStart](https://github.com/nette-examples/quickstart) is a very simple web application based on Nette Framework.\n[Zerops](https://zerops.io) recipe for Nette QuickStart includes session and cache stored in Redis, and PostgreSQL DB with [Nextras migrations](https://nextras.org/migrations/).\n\n![nette](https://raw.githubusercontent.com/zeropsio/recipe-shared-assets/main/covers/svg/cover-nette.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-nette/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- Setup for Nextras **database migrations** with automatic admin user creation\n- Logs set up to use **syslog** and accessible through Zerops GUI\n- Utilization of Zerops built-in **environment variables** system\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- Disable public access to Adminer or remove it altogether (remove service `adminer` from recipe YAML)\n- Set `APP_ENV` to `prod` in `envSecrets`, `app` section of import YAML\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-nette/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-nette/blob/main/app/Bootstrap.php:22) file to use env variables in your neon configuration files\n- Set debug mode according to `APP_ENV` env variable in your [./app/Bootstrap.php](https://github.com/zeropsio/recipe-nette/blob/main/app/Bootstrap.php:27) file\n- Add [nette/redis](https://github.com/nette/redis) to your composer.json to store sessions in Redis\n    - configure it according to our [./config/common.neon](https://github.com/zeropsio/recipe-nette/blob/main/config/common.neon#L44) file\n- Add [nette/monolog](https://github.com/nette/monolog) to your composer.json to log into the syslog\n    - utilize the following handler: `Monolog\\Handler\\SyslogHandler(app)` (see our [./config/common.neon](https://github.com/MichalSalon/recipe-nette/blob/main/config/common.neon#L38))\n- Add [nextras/migrations](https://github.com/nextras/migrations/) to your composer.json to utilize automated DB migrations\n  - create `./migrations` folder structure similar to this repo (we moved content of `database.sql` into it)\n  - SQLite (`./data/blog.sqlite`) was replaced by PostgreSQL database container\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## Additional info\n\nAdmin login for this recipe is `admin` with automatically generated password,\nwhich can be found under `ADMIN_PASSWORD` name in Zerops Environment variables section of `app` service.\n\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","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeropsio%2Frecipe-nette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeropsio%2Frecipe-nette/lists"}