Services are the building blocks of your application. They represent running workloads that handle requests, process data, serve web pages, or perform background jobs.Documentation Index
Fetch the complete documentation index at: https://docs.suga.app/llms.txt
Use this file to discover all available pages before exploring further.
What is a Service?
A service is a running instance of your application code:- Execution Environment - Where your code runs
- Configurable Resources - CPU, memory, and replicas
- Network Accessible - Public (HTTPS/TCP) or private (service discovery)
- Stateless - Use volumes for persistent storage
Containers vs. Functions
| Feature | Container | Function |
|---|---|---|
| Runtime | Any (Docker) | Deno only |
| Language | Any | TypeScript/JavaScript |
| Configuration | Image + tag | Code in editor |
| Setup | Docker build externally | Write code directly |
| AI Assistance | No | Yes (Pro) |
| Flexibility | High | Simple and fast |
| Best For | Full applications, databases | APIs, webhooks, prototypes |
Containers
Containers run Docker images from any registry. They provide maximum flexibility for existing applications in any language or framework. A container’s image comes from one of two sources:- Build from GitHub - Connect a repository so Suga builds the image for you. Each push to the watched branch triggers an automatic rebuild and redeploy.
- Pre-built Image - Pull an existing image from any Docker registry. Best when you already build elsewhere (CI, local Docker, another platform) or are running off-the-shelf images like databases, caches, etc.
Build from GitHub
Connect a GitHub repository and Suga builds the image for you. Pushes to the watched branch trigger an automatic rebuild and redeploy.Install the GitHub App
In the container’s Image section, choose Build from GitHub and install the Suga GitHub App on your account or organization. Grant access to the repositories you want to build from.
Select Repository and Branch
Pick a repository and the branch to watch. Pushes to this branch trigger a new build.
Choose How to Build
Pick a Dockerfile from the repo, or let Suga build automatically by detecting your language and framework.
The Suga GitHub App is installed once per account or organization. After installation, any container service can build from the repositories you’ve granted access to.
Pre-built Image
nginx:alpine- Official Nginx from Docker Hubpostgres:16-alpine- PostgreSQL 16ghcr.io/username/myapp:v1.0.0- GitHub Container Registry
Creating a Container
Configure Image
Set the display name, then choose your image source: a Pre-built Image from a registry, or Build from GitHub to build from source.
Supported Registries
Public (no credentials):- Docker Hub:
nginx,postgres,redis - GitHub Container Registry:
ghcr.io/username/image - Quay.io:
quay.io/organization/image
- Docker Hub, GHCR, GCR, ECR, ACR, self-hosted
Suga runs on Linux AMD64. If building on Apple Silicon, use
--platform linux/amd64.Always Pull Latest
For active development with the same tag, force fresh pulls:- Select container → Config tab → Image section
- Check “Always pull image”
- Deploy
Docker Compose Import
Import existing Docker Compose files:- Right-click canvas → “Import Compose”
- Paste YAML or upload file
- Review parsed services
- Import to canvas
Functions
Functions run Deno code. Write TypeScript/JavaScript directly in the dashboard instead of building Docker images.How Functions Work
Functions start an HTTP server on a configured port. Configuration (env vars, resources, networking, replicas) is identical to containers, but you write code in the Code tab instead of specifying an image.Default Template
New functions use this Hono-based template:Code Editor
Select function → Code tab → write code → Deploy. The editor supports TypeScript syntax highlighting and basic completion.Imports
Environment Variables
AI Assistant (Pro)
Pro plan includes the Vibe AI assistant in the code editor (500,000 tokens/month). It can help you write code, debug issues, and explain concepts.Common Configuration
Both containers and functions share these configuration options:
Resources
Each service is configured with CPU, memory, and replicas. Limits depend on your plan. See Plan Limits for tier maximums, resource pools, volume limits, and the CPU/memory ratio rules.Request Timeout by Plan
Each public HTTPS request is capped at a total time before the gateway returns a timeout response:| Plan | Per-request timeout |
|---|---|
| Free | 15 seconds |
| Pro | No limit |
| Enterprise | No limit |
Networking
Private - Services in the same environment communicate via service names:Environment Variables
Key-value configuration for your services:- Database connection strings
- API keys and secrets (mark as Sensitive)
- Feature flags and settings
Volumes
Persistent storage that survives restarts and redeployments:- Mount paths inside the container
- Size limits vary by plan
- Single-mount only (one service per volume)
Service Templates
Templates provide pre-configured services for common use cases:- PostgreSQL - Database with volume and default credentials
- Redis - Cache with persistence options
- MariaDB - MySQL-compatible database