Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
wip(import): Support for pipelineConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mlc-mlapis committed Nov 10, 2022
1 parent 22abf4a commit b703fba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/documentation/build/build-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Introduction

Zerops uses a YAML definition file to build your application. This file, `zerops.yml`, has to be placed in your project's root directory.
Zerops uses a YAML definition file to build your application. This file, `zerops.yml`, has to be placed in your application's root directory.

Each `zerops.yml` can contain definitions for one or more applications. It is especially valuable for a monorepo when one repository contains source code for various applications. The appropriate **service hostname** to which the application will be deployed is used to select a correct definition from the `zerops.yml`.

Expand Down
44 changes: 43 additions & 1 deletion src/documentation/export-import/project-service-export-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ Actual service DISK lower and upper limits:

The lower and upper service limits of DISK can be generally different for each service type and can be changed in the future.

Example of the verticalAutoscaling syntax:
Example of the `verticalAutoscaling` syntax:

```yml
verticalAutoscaling:
Expand All @@ -479,6 +479,48 @@ The format of the URL should be: `https://<domain>@<branchName>`

Related only to [Node.js](/documentation/services/runtimes/nodejs.html#how-to-deploy-application-code), [Golang](/documentation/services/runtimes/golang.html#how-to-deploy-application-code), and [PHP](/documentation/services/runtimes/php.html#how-to-deploy-application-code) runtime environment services.

#### pipelineConfig

`pipelineConfig`: zerops.yml (optional)

Zerops uses a YAML definition file to build your application. Normally, this file, [zerops.yml](/documentation/build/build-config.html), has to be placed in your application's root directory.

In cases where it is sufficient to use an already existing and publicly available third-party application by using its source code repository, the request to place the `zerops.yml` configuration file would always lead to the need to create a new fork of this repository.

But the `pipelineConfig` item allows you to place the necessary content of the `zerops.yml` configuration directly as a part of the import YAML script and avoid creating such a fork.

Example of the `pipelineConfig` syntax:

```yml
services:
- hostname: app
type: nodejs@16
ports:
- port: 3000
httpSupport: true
buildFromGit: https://github.com/third-party/project@main
pipelineConfig:
app:
build:
base:
- nodejs@16
build:
- npm i
deploy:
- package.json
- node_modules
- ./app/index.js
run:
start: yarn start
minContainers: 1
```

#### enableSubdomainAccess

`enableSubdomainAccess`: boolean (optional)

The default value is `false`. The value `true` allows to enable a [Zerops subdomain](/documentation/routing/zerops-subdomain.html) access immediately after a successful automatic build from a public repository specified by the `buildFromGit` item.

## Current known limitations

1. It's not possible to use private repositories in combination with the `buildFromGit` item. If you want to import a service related to a private repository, you have to connect it manually in the Zerops GUI.
Expand Down

0 comments on commit b703fba

Please sign in to comment.