Skip to content

Vorlagen für typische Stacks ​

Stand: 2. November 2026

Fertige Verträge zum Anpassen. Dein Agent bekommt dieselben Vorlagen mit get_platform_info(topic='examples') und nimmt die passende, statt Felder zu raten. Sag ihm zum Beispiel:

Bring dieses Repository auf Helfinity online. Nimm die passende Vorlage aus get_platform_info(topic='examples') und zeig mir den Plan, bevor du ausrollst.

So liest du die Vorlagen:

  • art_… steht für die artifact_id, die create_upload zurückgibt. Der Agent lädt dafür deinen Projektordner hoch (Aus Quellcode bauen).
  • Kein Dockerfile im Projekt? plan_deployment erkennt Node, Next.js, Python, Go und statische Seiten und schlägt eine Vorlage vor (Prüfung BUILD_DOCKERFILE_MISSING); dein Agent legt sie bei dir an, die Plattform schreibt nie selbst in dein Archiv. Alle Vorlagen: get_platform_info(topic='dockerfile_templates').
  • Die App muss auf 0.0.0.0 und dem Port aus $PORT hören (Standard 8080).
  • "access": "public" macht den Service für alle erreichbar. Ohne das Feld sehen ihn nur angemeldete Mitglieder deines Kontos (Login vor deiner App).
  • Alle Felder: Deployment Contract. Preise: Preise.

Statische Website ​

HTML, CSS und JavaScript, auch das Ergebnis von vite build, Astro oder Hugo.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "web",
    "source": { "type": "upload", "artifact_id": "art_…" },
    "port": 8080,
    "access": "public",
    "resources": { "memory_mb": 128 },
    "availability": { "scale_to_zero": true }
  }]
}

128 MB reichen für nginx. Mit scale_to_zero schläft eine selten besuchte Seite nach 15 Minuten ohne Anfrage und kostet dann nichts; die nächste Anfrage weckt sie in wenigen Sekunden (Scale-to-Zero).

Node.js-API oder Web-App ​

Express, Fastify, Hono, NestJS und ähnliche.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "api",
    "source": { "type": "upload", "artifact_id": "art_…" },
    "port": 8080,
    "access": "public",
    "resources": { "memory_mb": 256 },
    "health": { "path": "/healthz" },
    "env": { "NODE_ENV": "production" },
    "secrets": ["API_KEY"]
  }]
}
  • Die App liest den Port aus process.env.PORT.
  • health.path zeigt auf einen Endpunkt, der ohne Datenbank 200 liefert; sonst bricht ein langsamer Datenbankstart das Deployment ab.
  • Werte für secrets setzt der Agent vorher mit set_secrets; fehlt einer, blockiert der Plan.

Next.js ​

Next.js mit Server-Rendering. In next.config muss output: 'standalone' stehen.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "web",
    "source": { "type": "upload", "artifact_id": "art_…", "build_size": "large" },
    "port": 8080,
    "access": "public",
    "resources": { "memory_mb": 512, "cpu": "shared-0.5" }
  }]
}

next build braucht viel Speicher, deshalb build_size: "large" (8 GB, zählt als zwei Builds). Rein statisch exportierte Next.js-Seiten (output: 'export') laufen günstiger als statische Website.

Python-Web-App ​

FastAPI, Flask oder Django.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "api",
    "source": { "type": "upload", "artifact_id": "art_…" },
    "port": 8080,
    "access": "public",
    "resources": { "memory_mb": 256 },
    "health": { "path": "/" },
    "start_command": ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
  }]
}
  • start_command brauchst du nur, wenn das Dockerfile keinen passenden CMD hat. Für Flask oder Django: ["gunicorn", "-b", "0.0.0.0:8080", "app:app"].
  • Migrationen (alembic upgrade head, python manage.py migrate) laufen nach dem Deploy mit run_job, nicht beim Start (Jobs).

Go-Service ​

net/http, Gin, Echo oder Chi.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "api",
    "source": { "type": "upload", "artifact_id": "art_…" },
    "port": 8080,
    "access": "public",
    "resources": { "memory_mb": 128 },
    "health": { "path": "/healthz" }
  }]
}

Statisch gebaut (CGO_ENABLED=0) reicht ein kleines Image mit 128 MB. Den Port liest der Service mit os.Getenv("PORT").

Fertiges Image aus einer Registry ​

Ohne Build, zum Beispiel von Docker Hub, GHCR oder ECR Public.

json
{
  "api_version": "v1alpha1",
  "services": [{
    "name": "web",
    "source": { "type": "image", "image": "public.ecr.aws/nginx/nginx-unprivileged:1.29-alpine" },
    "port": 8080,
    "resources": { "memory_mb": 256 },
    "health": { "path": "/" }
  }]
}

Der Plan pinnt das Image auf einen Digest und prüft Plattform (linux/amd64) und Ports. Für eine private Registry: source.pull_secret mit einem Secret benutzer:token (Fertiges Image deployen).

App mit Datenbank und nächtlichem Job ​

Eine API, eine eigene PostgreSQL auf einem Volume und ein Aufräum-Job jede Nacht. Das sind drei Services, die Grenze auf Vertrauensstufe 1.

json
{
  "api_version": "v1alpha1",
  "services": [
    {
      "name": "api",
      "source": { "type": "upload", "artifact_id": "art_…" },
      "port": 8080,
      "access": "public",
      "resources": { "memory_mb": 256 },
      "health": { "path": "/healthz" },
      "connects_to": ["db"],
      "secrets": ["DATABASE_URL"]
    },
    {
      "name": "db",
      "source": { "type": "image", "image": "public.ecr.aws/docker/library/postgres:17-alpine" },
      "port": 5432,
      "public": false,
      "resources": { "memory_mb": 512 },
      "health": { "type": "tcp" },
      "secrets": ["POSTGRES_PASSWORD"],
      "storage": { "volumes": [{ "name": "pgdata", "mount_path": "/var/lib/postgresql/data", "size_gb": 1 }] }
    },
    {
      "name": "cleanup",
      "source": { "type": "upload", "artifact_id": "art_…" },
      "connects_to": ["db"],
      "secrets": ["DATABASE_URL"],
      "schedule": { "cron": "15 3 * * *", "command": ["node", "scripts/cleanup.js"] }
    }
  ]
}
  • DATABASE_URL ist postgres://postgres:<passwort>@db.<projekt>.internal:5432/postgres; beide Secrets setzt der Agent vor dem Plan mit set_secrets.
  • Das Volume wird täglich gesichert. Ein Service mit Volume wird beim Deployment ersetzt, die Datenbank ist dabei kurz weg (Daten und Speicher).
  • cleanup läuft nur zu seinen Zeiten und kostet nur seine Laufzeit. Für einen Worker, der dauernd läuft, statt schedule den Eintrag "health": { "type": "process" } setzen (Standardweg).