---
title: "Serverless: deploy from a repository, database included · Frazer"
description: "Services that scale to zero, jobs that run to completion, and stacks that bring their database, cache, bucket and model route with them, on your servers or the Frazer fleet."
url: https://frazer.ai/serverless
index: https://frazer.ai/llms.txt
tokens: 1637
---

> For agents: every page on frazer.ai is indexed at https://frazer.ai/llms.txt.

# Serverless: deploy from a repository, database included · Frazer

**Serverless**  frazer.ai

# Deploy from a repository.  
Database included, on your servers.

Services that scale to zero, jobs that run to completion, and stacks that bring their database, cache, bucket and model route with them, wired without a copied secret. One question at the first deploy, Kubernetes or serverless, and one plan to apply.

[Deploy a repository](https://frazer.ai/start?product=serverless) [Read the docs](https://frazer.ai/docs)

```
$ frazer serverless deploy notes-api --source . --with postgres,valkey --dry-run
  Detected  Next.js · Prisma (Postgres) · ioredis (Valkey)
  Plan      + stack notes · service notes-api · scale 0–5 · sandbox
            + Postgres notes-db · small · PITR 7 days · binding DATABASE_URL
            + Valkey notes-cache · Basic · binding VALKEY_URL
            + notes-api-p7k2.frazer.run · TLS
  Cost      $0 while idle · on your servers
? Apply? yes   ✓ revision notes-api-00001 ready
```

```
# frazer.stack.yaml  (frazer serverless stacks create notes --from frazer.stack.yaml --dry-run)
apiVersion: frazer.ai/v1
kind: Stack
name: notes
services:
  notes-api:
    source: {repo: acme/notes, branch: main}
    scaling: {min: 0, max: 5, concurrency: 80}
    runtime: sandbox
    access: public
    bind: {DATABASE_URL: postgres/notes-db, VALKEY_URL: memory/notes-cache}
postgres: {notes-db: {version: "18", tier: small, pitr: 7d}}
memory:   {notes-cache: {engine: valkey, mode: basic}}
```

lena deploy it

Frazer Detected Next.js · Prisma (Postgres) · ioredis (Valkey). Kubernetes or serverless?

Plan · stack notes

\+ stack notes · service notes-api · scale 0–5 · sandbox

\+ Postgres notes-db · small · PITR 7 days · binding DATABASE\_URL

\+ Valkey notes-cache · Basic · binding VALKEY\_URL

Cost: $0 while idle · on your servers

Serverless · Recommended Kubernetes Deploy

Frazer notes-api is live at notes-api-p7k2.frazer.run · Postgres notes-db ready

One deploy from the CLI, a stack file or the Frazer app demo organization

01 · How a deploy works Fig. 1

## From a push to a URL.  
Every step a revision you can roll back.

**Fig. 1** The deploy path, with the bindings it creates

02 · Kubernetes or serverless?

## Asked once, with a reason.  
Move either way later.

### Serverless

Recommended for this repo

A stateless HTTP or gRPC service up to 8 vCPU and 32 GiB, or a project with no cluster yet.

-   Scale to zero, pay while an instance exists
-   Revisions, traffic splits and tagged URLs
-   Frazer runs the runtime cluster for you

### Kubernetes

StatefulSets, operators, raw TCP or UDP, host networking, or an app already in an environment repository.

-   Your project’s cluster, GitOps from your Git
-   Any workload Kubernetes runs
-   `frazer serverless move notes-api --to kubernetes` opens the PR

03 · Stacks Fig. 2

## An app and its data,  
created together.

The deploy dialog reads your code and proposes the database, cache, bucket and model route it uses. A stack creates them in one plan, wires them with bindings, shows one cost line, and deletes together with final backups.

Stack · notes acme-staging one cost line · one delete

-   **notes-api** service · revision 00042 · 2 instances notes-api-p7k2.frazer.run
-   **notes-db** Postgres 18 · small · PITR 7 days DATABASE\_URL
-   **notes-cache** Valkey · Basic VALKEY\_URL
-   **notes-uploads** bucket · lifecycle 30 days S3\_BUCKET
-   **llm:balanced** LLM gateway route · budget $20/day FRAZER\_LLM\_BASE\_URL
-   **notes-digest** job · daily 07:00 from notes-api

People see names, sources and versions; never values. 

**Fig. 2** A stack and its bindings product UI, demo organization

04 · Everything around the service

## The parts you expect.  
None you have to assemble.

-   ### Revisions and traffic
    
    Immutable revisions, splits for canaries, rollback in one plan.
    
-   ### Tagged URLs
    
    Every tag gets its own URL for review.
    
-   ### Scale to zero, or not
    
    Min and max instances, hard concurrency, warm minimums for latency.
    
-   ### Jobs
    
    Run to completion, on a schedule or from a service.
    
-   ### Domains and TLS
    
    Your hostname, certificates included.
    
-   ### Logs and metrics
    
    In Frazer Monitoring, per revision.
    
-   ### Previews per pull request
    
    A stack per PR with seeded data.
    
-   ### Worker pools and functions
    
    Queue consumers, and services built from a function source.
    

05 · Pricing

## No serverless premium.  
No request fee.

You pay for vCPU and memory while an instance exists, at the same rate as a VM. On your own servers it is part of the server fee.

[See every price](https://frazer.ai/pricing#lines)

Your servers **Included** in the per-core server fee

Fleet, vCPU $0.030 per vCPU-hour, billed per second

Fleet, memory $0.007 per GiB-hour

Idle $0 at zero instances; data services bill as themselves

Questions

## Serverless, answered.

Is this a functions product?

No. Serverless runs containers: services that scale with requests, jobs that run to completion, and stacks that bring their data. A function is a service built from a function source, with no per-invocation runtime.

Where does my code run?

In a serverless runtime cluster that Frazer runs for your organization at each site, on your own servers or on the Frazer fleet. You never manage that cluster, and your code runs in a sandbox with a user-space kernel.

Can I move a service to Kubernetes later?

Yes. Move to Kubernetes writes the service into an environment repository you choose as a Git pull request, then shifts traffic at the gateway and retires the service. Moving the other way works too. Both are plans with a cutover step, and the data stays where it is.

How are database passwords handled?

A binding creates a database role for the service, keeps its password in the secrets store and injects DATABASE\_URL over a private endpoint. People see names, sources and versions, never values. A new password rolls out as a new revision.

## More in Compute

-   [**Servers and pools** Bring, rent or buy servers](https://frazer.ai/servers)
-   [**Kubernetes** A cluster per project](https://frazer.ai/kubernetes)
-   [**VMs** Images, disks, groups](https://frazer.ai/vms)
-   [**Devboxes** Real machines per engineer](https://frazer.ai/devboxes)

## Push a repository.  
Get a URL and a database.

[Deploy a repository](https://frazer.ai/start?product=serverless) [Read the docs](https://frazer.ai/docs)
