Skip to main content
Server services run long-running web applications, APIs, and microservices. Each server instance runs continuously and can handle incoming requests.
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/api
  build:
    context: .
    dockerfile: Dockerfile

Build from Dockerfile

Build your application from a Dockerfile in your GitHub repository.
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/api
  build:
    context: .             # relative to repo root
    dockerfile: Dockerfile # relative to repo root
    args:
      NODE_ENV: production

Build from Source Code

Use Nixpacks buildpack to automatically detect and build your application from source code.
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/api
  build:
    context: .             # relative to repo root
    buildpack: nixpack
    command: npm run build

Use Public Images

Deploy pre-built Docker images from public registries. Use the full image reference including the registry domain. From Docker Hub:
kind: Service
metadata:
  name: nginx
spec:
  type: server
  image: nginx
From other public registries:
kind: Service
metadata:
  name: app
spec:
  type: server
  image: ghcr.io/owner/repo

Use Private Images

Deploy images from private registries. First, connect your private registry through Settings in the Ryvn Dashboard, then reference it by name.
kind: Service
metadata:
  name: app
spec:
  type: server
  image: ghcr.io/acme/app
  registry: acme-ghcr     # registry name on ryvn

Properties

name

string — required Service identifier. Must be lowercase, alphanumeric with hyphens only.
name: api

type

string — required Must be server.
type: server

repo

string — conditional GitHub repository in owner/repo format. Required when using build.
repo: acme/api

image

string — conditional Docker image reference (e.g., nginx:1.24 or ghcr.io/acme/app:v1.0.0). Required when not using build.
image: nginx:1.24

registry

string — optional Registry name for private images.
registry: ghcr

build.branches

array — optional List of branches that trigger releases on push. Each entry has a name and optional args (build arguments specific to that branch). When configured, pushing to any listed branch builds and releases the service automatically. Installations can then track a specific branch using the branch field. Mutually exclusive with promotionPipeline.
build:
  branches:
    - name: main
    - name: staging
      args:
        ENV: staging

promotionPipeline

string — optional Name of promotion pipeline to follow for automated release promotion.
promotionPipeline: main-pipeline

maintenanceWindow

string — optional Maintenance window for this service. Automated deployments will only occur during specified intervals.
maintenanceWindow: overnight

build.context

string — required Build context path relative to repository root. Required when using build.
build:
  context: backend/

build.dockerfile

string — conditional Path to Dockerfile relative to repository root. Required unless using build.buildpack.
build:
  dockerfile: Dockerfile

build.buildpack

string — optional Buildpack to use for automatic builds. Must be nixpack. Cannot be used with build.dockerfile.
build:
  buildpack: nixpack

build.args

object — optional Build arguments as key-value pairs passed to Docker build.
build:
  args:
    NODE_ENV: production
    API_VERSION: v2

build.command

string — optional Build command to run. Only valid when using build.buildpack.
build:
  command: npm run build

Examples

Monorepo with multiple services:
# frontend.service.yaml
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: Service
metadata:
  name: frontend
spec:
  type: server
  repo: acme/monorepo
  build:
    context: frontend
    dockerfile: frontend/Dockerfile

# api.service.yaml
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/monorepo
  build:
    context: backend
    dockerfile: backend/Dockerfile
    args:
      NODE_ENV: production
Deploy from branches:
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/backend
  build:
    context: .
    dockerfile: Dockerfile
    branches:
      - name: main
      - name: staging
With promotion pipeline:
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: Service
metadata:
  name: api
spec:
  type: server
  repo: acme/backend
  promotionPipeline: main-pipeline
  build:
    context: .
    dockerfile: Dockerfile