Schema Overview
Introduction to the lifecycle.yaml configuration file and its structure
The lifecycle.yaml file is the core configuration file that defines how Lifecycle manages your ephemeral environments. Place this file at the root of your repository.
File Structure
A lifecycle.yaml file has three main sections:
| Section | Description |
|---|---|
version | Schema version (currently "1.0.0") |
environment | Controls deployment behavior, service grouping, and webhooks |
services | Array of service definitions with their configurations |
Service Types
Each service in the services array must have exactly one service type configured. Choose based on your deployment needs:
| Service Type | Use Case |
|---|---|
| github | Build and deploy from a GitHub repository with Dockerfile |
| docker | Deploy pre-built Docker images (databases, caches, etc.) |
| helm | Deploy using Helm charts (local or remote) |
| codefresh | Trigger external Codefresh pipelines for deployment |
| auroraRestore | Restore AWS Aurora database snapshots |
| configuration | Deploy configuration-only services (feature flags, shared config) |
Choosing a Service Type
Minimal Example
Here’s the simplest valid lifecycle.yaml for a single service:
Complete Example
A more complete example with multiple service types:
Template Variables
Throughout your configuration, you can use template variables like {{api_publicUrl}} or {{database_internalHostname}} to reference dynamic values from other services.
See the Template Variables guide for the complete list of available variables and usage examples.
Next Steps
- Environment Configuration - Configure deployment behavior and service grouping
- Webhooks - Automate actions on deployment events
- GitHub Service - Build and deploy from source
- Docker Service - Deploy pre-built images
- Helm Service - Deploy with Helm charts