Skip to content

zeropsio/recipe-nette-contributte

Repository files navigation

Zerops x Nette + Contributte

Nette Contributte is a web application skeleton based on Nette Framework, Doctrine and Contributte libraries. Zerops recipe for Contributte skeleton includes session and cache stored in Redis, and PostgreSQL DB with doctrine migrations.

nette contributte


Deploy on Zerops

You can either click the deploy button to deploy directly on Zerops, or manually copy the import yaml to the import dialog in the Zerops app.

Deploy on Zerops


Recipe features

  • Nette running on a load balanced Zerops PHP + Nginx service
  • Zerops PostgreSQL 16 service as database
  • Zerops KeyDB (Redis) service for session and cache
  • Proper setup for Nettrine cache, optimization, and database migrations
  • Logs set up to use syslog and accessible through Zerops GUI
  • Utilization of Zerops built-in environment variables system
  • Mailpit as SMTP mock server
  • AdminerEvo for quick database management tool

Production vs. development

Base of the recipe is ready for production, the difference comes down to:

  • Use highly available version of the PostgreSQL database (change mode from NON_HA to HA in recipe YAML, db service section)
  • Use at least two containers for Nette service to achieve high reliability and resilience (add minContainers: 2 in recipe YAML, app service section)
  • Use production-ready third-party SMTP server instead of Mailpit (change parameters.smtp variables in ./config/app/parameters.neon file)
  • Disable public access to Adminer or remove it altogether (remove service adminer from recipe YAML)
  • Set NETTE_DEBUG to 0 and NETTE_ENV to prod in envSecrets, app section of import YAML
  • Create admin user manually through create-user console command (in dev mode this is handled by fixtures) and
    • remove following line from zerops.yml:
      • - zsc execOnce ${appVersionId}-fixtures -- php /var/www/bin/console doctrine:fixtures:load --no-interaction
    • add --no-dev to the following line in zerops.yml:
      • - composer install --optimize-autoloader

Changes made over the default installation

If you want to modify your existing Nette app to efficiently run on Zerops, these are the general steps we took:



Additional info

Admin login for this recipe is [email protected] with automatically generated password, which can be found under ADMIN_PASSWORD name in Zerops Environment variables section of app service.

Need help setting your project up? Join Zerops Discord community.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •