Environment Configuration
Configure deployment behavior, service grouping, and automation for ephemeral environments
The environment section controls how Lifecycle deploys and manages your ephemeral environments. It defines which services are deployed by default, which are optional, and how automation (webhooks) should behave.
Fields Reference
| Field | Type | Required | Description |
|---|---|---|---|
autoDeploy | boolean | No | Automatically deploy on PR updates |
defaultServices | array | Yes | Services deployed with every environment |
optionalServices | array | No | Services available on-demand |
webhooks | array | No | Automation triggers on state changes |
enabledFeatures | array | No | Feature flags for the environment |
githubDeployments | boolean | No | Create GitHub deployment records |
useGithubStatusComment | boolean | No | Post status comments on PRs |
defaultServices
Services listed in defaultServices are deployed automatically when an environment is created. At least one default service is required.
Service Reference Fields
Each entry in defaultServices can include optional fields to override the service configuration:
| Field | Type | Description |
|---|---|---|
name | string | Required. Name matching a service in the services array |
repository | string | Override the repository for this service |
branch | string | Override the branch for this service |
serviceId | number | Internal service ID reference |
optionalServices
Services listed in optionalServices are not deployed by default but can be added to an environment on-demand through the Lifecycle UI or API.
Optional services are useful for components that aren’t always needed, like background workers, caching layers, or additional databases for specific testing scenarios.
autoDeploy
When autoDeploy is enabled, Lifecycle automatically triggers a deployment whenever the PR is updated (new commits pushed).
With autoDeploy: true, environments are created automatically on every
commit to the PR branch without requiring manual label addition.
webhooks
Webhooks allow you to trigger external actions when the environment reaches certain states. See the Webhooks page for detailed configuration.
Examples
The minimal configuration requires only defaultServices: