Skip to main content

Prerequisites

Deploy from Recipe

1

Import

Log in to Zerops GUI.
2

Configuration

project:
  name: my-first-dotnet-app
services:
  - hostname: app
    type: dotnet@8
    minContainers: 1
    maxContainers: 3
    buildFromGit: https://github.com/zeropsio/recipe-dotnet-hello-world@main
    enableSubdomainAccess: true
3

Deploy

Click Import project.

Create Your Application

dotnet new webapi -n MyApi
cd MyApi

Add zerops.yaml

zerops.yaml
zerops:
  - setup: app
    build:
      base: dotnet@8
      buildCommands:
        - dotnet restore
        - dotnet publish -c Release -o out
      deployFiles:
        - out
      cache: ~/.nuget/packages
    
    run:
      start: dotnet out/MyApi.dll
      ports:
        - port: 5000
          httpSupport: true
      envVariables:
        ASPNETCORE_URLS: http://+:5000
        ASPNETCORE_ENVIRONMENT: Production

Deploy

zcli service deploy

Next Steps

Runtime Overview

Learn about .NET runtime

Scaling

Configure auto-scaling

Build docs developers (and LLMs) love