Skip to content

Templates for typical stacks ​

As of: November 2, 2026

Finished contracts to adapt. Your agent gets the same templates with get_platform_info(topic='examples') and takes the fitting one instead of guessing fields. Tell it for example:

Put this repository online on Helfinity. Take the fitting template from get_platform_info(topic='examples') and show me the plan before you roll it out.

How to read the templates:

  • art_… stands for the artifact_id that create_upload returns. For it the agent uploads your project folder (Build from source).
  • No Dockerfile in the project? plan_deployment recognizes Node, Next.js, Python, Go and static sites and suggests a template (check BUILD_DOCKERFILE_MISSING); your agent creates it on your side, the platform never writes into your archive itself. All templates: get_platform_info(topic='dockerfile_templates').
  • The app must listen on 0.0.0.0 and the port from $PORT (default 8080).
  • "access": "public" makes the service reachable by everyone. Without the field only signed-in members of your account see it (Login in front of your app).
  • All fields: Deployment Contract. Prices: Prices.

Static website ​

HTML, CSS and JavaScript, also the output of vite build, Astro or 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 is enough for nginx. With scale_to_zero a rarely visited site sleeps after 15 minutes without requests and then costs nothing; the next request wakes it within a few seconds (Scale-to-zero).

Node.js API or web app ​

Express, Fastify, Hono, NestJS and similar.

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"]
  }]
}
  • The app reads the port from process.env.PORT.
  • health.path points to an endpoint that returns 200 without a database; otherwise a slow database start aborts the deployment.
  • The agent sets values for secrets beforehand with set_secrets; if one is missing, the plan blocks.

Next.js ​

Next.js with server rendering. next.config must contain output: 'standalone'.

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 needs a lot of memory, hence build_size: "large" (8 GB, counts as two builds). Purely statically exported Next.js sites (output: 'export') run cheaper as a static website.

Python web app ​

FastAPI, Flask or 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"]
  }]
}
  • You need start_command only when the Dockerfile has no fitting CMD. For Flask or Django: ["gunicorn", "-b", "0.0.0.0:8080", "app:app"].
  • Migrations (alembic upgrade head, python manage.py migrate) run after the deploy with run_job, not at start (Jobs).

Go service ​

net/http, Gin, Echo or 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" }
  }]
}

Built statically (CGO_ENABLED=0), a small image with 128 MB is enough. The service reads the port with os.Getenv("PORT").

Finished image from a registry ​

Without a build, for example from Docker Hub, GHCR or 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": "/" }
  }]
}

The plan pins the image to a digest and checks platform (linux/amd64) and ports. For a private registry: source.pull_secret with a secret user:token (Deploy a finished image).

App with database and nightly job ​

An API, its own PostgreSQL on a volume and a clean-up job every night. That is three services, the limit at trust level 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 is postgres://postgres:<password>@db.<project>.internal:5432/postgres; the agent sets both secrets before the plan with set_secrets.
  • The volume is backed up daily. A service with a volume is replaced on deployment; the database is briefly gone then (Data and storage).
  • cleanup runs only at its times and costs only its run time. For a worker that runs continuously, set the entry "health": { "type": "process" } instead of schedule (Standard path).