A Laravel application connected to PostgreSQL, Valkey (Redis-compatible), S3-compatible object storage, and Meilisearch, running on Zerops with six ready-made environment configurations — from AI agent and remote development to stage and highly-available production.
Lightweight project core
Single dedicated container with balancers (L3/L7), logger and statistics services
After deploying one of the environments and getting to know Zerops, you have two paths forward. 1 Clone our GitHub repositories and use the whole recipe as a template, or if you already have an existing application on a similar stack, 2 integrate the recipe setup with your application.
or
Taking ownership of theenvironment
Small production environment offers a production-ready setup optimized for moderate throughput.
Go to Service Settings > Pipelines & CI/CD Settings in the Zerops Dashboard and connect your repository.
For production, use a trigger on new tags. This keeps deployments intentional and tied to a specific version. You can also add a regex filter, such as ^v[0-9]+\.[0-9]+\.[0-9]+$, if you want to allow only semantic version tags.
Alternatively, add zcli push to your existing CI/CD pipeline if you want full control over when deployments happen.
Pay attention to minFreeRamGB. This value tells Zerops when to scale RAM vertically. Adjust it based on your app’s real memory needs. RAM scales up immediately, while CPU scales after two consecutive measurements below the threshold.
lightbulbTip
Run a quick stress test with a tool like hey before real users arrive. This helps you see how your app behaves under load and tune the autoscaling settings.
When changing DNS records for production, start with a low TTL value. Make sure SSL certificates are active before you disable the fallback Zerops subdomain.
Once everything works, you can disable the Zerops subdomain so all traffic goes through your custom domain.
Your application is live in production and the core setup is complete.
The following sections are optional. They cover extra production features such as log forwarding, backups, and diagnostic access. You can stop here and come back later when you need them.
No .env file — Zerops injects environment variables as OS env vars. Creating a .env file with empty values shadows the OS vars, causing env() to return null for every key that appears in .env even if the platform has a value set.
Cache commands in initCommands, not buildCommands — config:cache, route:cache, and view:cache bake 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_KEY is 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 in zerops.yaml envVariables.
PDO PostgreSQL extension — The php-nginx base image includes pdo_pgsql out of the box. No prepareCommands or apk add needed for PostgreSQL connectivity.
Predis over phpredis — The php-nginx base image does not include the phpredis C extension. Use the predis/predis Composer package and set REDIS_CLIENT=predis to 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.
A Laravel application connected to PostgreSQL, running on Zerops with six ready-made environment configurations — from AI agent and remote development to stage and highly-available production.
A minimal PHP application paired with PostgreSQL on Zerops, demonstrating database connectivity, idempotent migrations, and six ready-made environment configurations spanning the full development lifecycle.
Production-grade WordPress on Zerops — Composer-managed core, an isolated web root, a Redis object cache, S3-backed media, and real cron. A 12-factor take on WordPress, wired natively into the platform.
A Bun application connected to PostgreSQL, running on Zerops with six ready-made environment configurations — from AI agent and remote development to stage and highly-available production.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#zeropsPreprocessor=on
# Small production environment offers a production-ready setup optimized for
# moderate throughput.
# APP_KEY — production encryption key shared across all app and worker
# containers. Critical for session validity when the L7 balancer distributes
# requests across multiple containers.
project:
name: laravel-showcase-small-prod
envVariables:
APP_KEY: <@generateRandomString(<32>)>
services:
# Small production — minContainers: 2 guarantees two app containers at all
# times, enabling rolling deploys with zero downtime (one container serves
# traffic while the other rebuilds). Zerops autoscales RAM within
# verticalAutoscaling bounds to absorb traffic spikes without manual
# intervention.
- hostname: app
Copy CNAME to clipboard
Advanced configuration for the location, like redirects, basic auth and rate limiting.