Import Methods
You can import configurations in two ways: Using the GUI:- For projects: Click Import a project in the Projects section of the Zerops dashboard
- For services: Navigate to a project’s details page and click Import services
zcli project project-import <importYamlPath>- Import entire projectzcli project service-import <importYamlPath>- Import services into existing project
File Structure
The import YAML consists of two main sections:Project Configuration
project
Define a project to import. Required when importing a whole project, omitted when importing services into an existing project.
project.name
The name of the new project. Duplicates are allowed.
project.description
Description of the new project.
project.corePackage
project.tags
One or more tags for better project organization and filtering.
project.envVariables
Project-level environment variables that are available to all services in the project.
Service Configuration
Theservices section defines one or more services to import into your project.
services
List of services to create. At least one service is required.
Service Basic Configuration
services[].hostname
The unique service identifier within the project.Limitations:
- No duplicates in the same project
- Maximum 25 characters
- Lowercase ASCII letters (a-z) or numbers (0-9) only
services[].type
services[].mode
Operation mode of the service.Values:
NON_HA- Non-High-Availability (default)HA- High-Availability
services[].envSecrets
Environment variables that are blurred by default in the Zerops GUI. Can be edited or deleted later.
The
yamlPreprocessor directive enables functions like generateRandomString. See yamlPreprocessor documentation.services[].dotEnvSecrets
Environment variables in .env file format that are automatically created as secret environment variables.
services[].objectStorageSize
Object storage size in GB.
services[].objectStoragePolicy
Select a predefined AWS S3 bucket access policy.Values:
private- No public accesspublic-read- Public read accesspublic-objects-read- Public read access to objects onlypublic-write- Public write accesspublic-read-write- Public read and write accesscustom- Use custom policy defined inobjectStorageRawPolicy
services[].objectStorageRawPolicy
Define a custom AWS S3 bucket access policy. See AWS documentation for details.Use
{{ .BucketName }} placeholder to reference the bucket name in your policy.services[].buildFromGit
URL of a GitHub or GitLab repository for a one-time build of your service.
services[].enableSubdomainAccess
Enable public access to your service via a Zerops subdomain. Not recommended for production use.
services[].priority
Services are sorted before creation by priority in descending order. Higher priority services are created first.
services[].override
For runtime services only. When set to true, replaces an existing service with the same hostname and triggers a redeploy.
Service Vertical Autoscaling
Configure how services scale their resources vertically.services[].verticalAutoscaling
Vertical autoscaling configuration for the service.
services[].verticalAutoscaling.minCpu / maxCpu
Minimum number of virtual CPUs.
Maximum number of virtual CPUs.
services[].verticalAutoscaling.cpuMode
CPU allocation mode.Values:
SHARED- Shared CPU coresDEDICATED- Dedicated CPU cores
services[].verticalAutoscaling.minRam / maxRam
Minimum RAM in GB.
Maximum RAM in GB.
services[].verticalAutoscaling.minDisk / maxDisk
Minimum disk space in GB.
Maximum disk space in GB.
services[].verticalAutoscaling.startCpuCoreCount
Number of CPU cores with which each container starts.
services[].verticalAutoscaling.minFreeCpuCores
Minimum number of unused CPU cores before a container starts scaling.
services[].verticalAutoscaling.minFreeCpuPercent
Minimum percentage of unused CPU cores before a container starts scaling.
services[].verticalAutoscaling.minFreeRamGB
Minimum unused memory in GB before a container starts scaling.
services[].verticalAutoscaling.minFreeRamPercent
Minimum percentage of unused memory before a container starts scaling.
Service Horizontal Autoscaling
Configure the number of containers for the service.services[].minContainers
Minimum number of containers. Maximum value: 10.
services[].maxContainers
Maximum number of containers. Maximum value: 10.
Service Mount Shared Storage
services[].mount
List of shared storage services to mount. Requires
buildFromGit to be set.Service Nginx Configuration
services[].nginxConfig
Full nginx configuration for the service.
Service zerops.yaml Configuration
services[].zeropsSetup
Specifies which service setup to use from the zerops.yaml configuration. This should match a setup name in either the
zeropsYaml parameter or the zerops.yaml file in the repository.If not specified, defaults to the service hostname.services[].zeropsYaml
Full zerops.yaml configuration embedded in the import file. If provided, this takes precedence over any
zerops.yaml file in the repository.How zeropsSetup and zeropsYaml Work Together
Neither parameter specified
Neither parameter specified
- System looks for a
zerops.yamlfile in the repository root - Searches for a setup with a name matching the service hostname
Only zeropsSetup specified
Only zeropsSetup specified
- System looks for the specified setup name in the repository’s
zerops.yamlfile
Only zeropsYaml specified
Only zeropsYaml specified
- System uses the provided YAML configuration
- Searches for a setup with a name matching the service hostname
Both parameters specified
Both parameters specified
- System uses the provided
zeropsYamlconfiguration - Looks for the setup named in
zeropsSetupwithin that YAML
Complete Examples
Export Projects and Services
Zerops allows you to export existing projects and services as YAML configurations through the GUI.Export a Single Service
- Navigate to your service dashboard
- Click the three-dot menu (⋮) in the top-right corner
- Select Export service as yaml
Export an Entire Project
- Go to the project dashboard
- Click the three-dot menu (⋮) in the top-right corner
- Select Export project as yaml
Using Exported Configurations
Exported YAML files are compatible with:- Zerops GUI import functionality
zcli project project-importcommandzcli project service-importcommand
- Create backups of configurations
- Replicate setups across environments
- Share templates with team members
- Version control your infrastructure
Related Resources
CLI Reference
Learn about zCLI commands for importing
zerops.yaml Specification
Full reference for build and runtime configuration
YAML Preprocessor
Generate secrets and random values
Service Types
Available service types and versions