RESOURCE CATALOG
VM (Instância)
VM instance: web, API, workers, or cron — web terminal and root SSH.
type: "compute"analogous to a managed container serviceDefinition
The most common workload resource type. Packages a container, declares CPU and memory, defines replica bounds, and exposes a port. With **Start**, the platform deploys the Docker image on the nucleus and returns the public URL.
When to use
- Sites and SPAs (React, Vue, Next.js, Astro).
- HTTP and gRPC APIs.
- Workers consuming queues.
- Periodic jobs (cron subtype).
When not to use
- Databases — use Datastore.
- Workloads requiring dedicated GPU — available on Enterprise contracts only.
Configuration fields
Each field is validated at creation time. Defaults apply when fields are omitted.
config · compute
| Campo | Tipo | Default · Opções |
|---|---|---|
subtipo Tipo | enum | webapiworkercronDefault web |
imagem Imagem (container) | string | Default nginx:latest |
porta Porta | int | Default 80 |
cpu vCPU | string | Default 0.25 |
memoria_mb Memória (MB) | int | Default 256 |
replicas_min Réplicas mín. | int | Default 1 |
replicas_max Réplicas máx. | int | Default 1 |
Examples
Full payloads for POST to /api/projetos/{id}/recursos:
API with 2 minimum replicas
json
{
"tipo": "compute",
"nome": "api-pedidos",
"config": {
"subtipo": "api",
"imagem": "ghcr.io/acme/api-pedidos:1.4.0",
"porta": 3000,
"cpu": "0.5",
"memoria_mb": 512,
"replicas_min": 2,
"replicas_max": 6
}
}Async worker
json
{
"tipo": "compute",
"nome": "fila-emails",
"config": {
"subtipo": "worker",
"imagem": "ghcr.io/acme/email-worker:0.9",
"cpu": "0.25",
"memoria_mb": 256,
"replicas_min": 1,
"replicas_max": 4
}
}