or
Taking ownership of theenvironment
AI agent environment provides a development space for AI agents to build and version the app. It includes a dev service with the code repository and necessary development tools, a staging service, a low-resource database, a cache store, an object storage, and a search engine.
Knowledge Base
PHP+Nginxappdevappstageworkerstage
zerops-recipe-apps/laravel-showcase-appGotchas
- No
.envfile — Zerops injects environment variables as OS env vars. Creating a.envfile with empty values shadows the OS vars, causingenv()to returnnullfor every key that appears in.enveven if the platform has a value set. - Cache commands in
initCommands, notbuildCommands—config:cache,route:cache, andview:cachebake absolute paths into their cached files. The build container runs at/build/source/while the runtime serves from/var/www/. Caching during build produces paths like/build/source/storage/...that crash at runtime with "directory not found." APP_KEYis project-level — Laravel's encryption key must be shared across all services that read the same database (app + worker both need the same key for sessions and encrypted columns). Set it once at project level in Zerops; do not add it per-service or inzerops.yaml envVariables.- PDO PostgreSQL extension — The
php-nginxbase image includespdo_pgsqlout of the box. NoprepareCommandsorapk addneeded for PostgreSQL connectivity. - Predis over phpredis — The
php-nginxbase image does not include thephpredisC extension. Use thepredis/predisComposer package and setREDIS_CLIENT=predisto avoid "class Redis not found" errors. - Object storage requires path-style — Zerops object storage uses MinIO, which requires
AWS_USE_PATH_STYLE_ENDPOINT=true. Without it, the SDK attempts virtual-hosted bucket URLs that MinIO cannot resolve.
Related platform & services docs
PostgreSQL ConnectBackup & Restore Manage Scale
ValkeyConfiguration & Access
Meilisearch Configuration AccessBackup & Restore