zerops.yaml file is the core configuration file that defines how Zerops should build and deploy your application. This file must be placed in the root of your repository and is essential for automating your application’s build and deployment pipeline.
What is zerops.yaml?
Thezerops.yaml file provides a declarative way to configure:
- Build environment and dependencies
- Build commands and processes
- Deployment files and caching
- Runtime environment setup
- Health checks and readiness probes
- Environment variables
- Port configurations
- Cron jobs
- And much more
Basic Structure
Azerops.yaml file follows this basic structure:
1. Setup Section (Required)
Thesetup section specifies which service in your Zerops project this configuration applies to:
2. Build Section (Optional)
Thebuild section defines how your application should be built:
- Choose base technology and version
- Install dependencies with
prepareCommands - Run build processes with
buildCommands - Specify which files to deploy with
deployFiles - Cache directories for faster subsequent builds
3. Deploy Section (Optional)
Thedeploy section controls deployment behavior:
- Control container replacement order
- Define readiness checks to verify deployment success
- Configure deployment timeouts
4. Run Section (Required)
Therun section defines how your application should run in production:
- Define startup commands
- Configure ports and protocols
- Set environment variables
- Define health checks
- Run initialization commands
- Schedule cron jobs
Multi-Service Configuration
For monorepos or projects with multiple services, you can define multiple service configurations in a singlezerops.yaml:
Configuration Inheritance with extends
Use theextends feature to create reusable base configurations:
Parameter Availability
Not all parameters are available for every service type. Most parameters work across different runtime services, but some are specific to certain service types:
documentRootandsiteConfigPath- webserver services onlyrouting- Static services onlyhealthCheck- runtime services only
Quick Start Guide
- Create the file: Add
zerops.yamlto your repository root - Define your service: Set the
setupvalue to match your service hostname - Configure build (optional): Define how to build your application
- Configure runtime: Define how to run your application
- Commit and push: Zerops will automatically use this configuration
Example Configurations
Node.js Application
PHP Application
Python Application
Next Steps
Full Specification
Explore all available parameters and configuration options
Base Technologies
View supported runtime and build technologies
Cron Jobs
Learn how to schedule automated tasks
Build Pipeline
Understand the complete build and deploy pipeline