Version
Required. SDL version identifier.
version: "2.0"| Value | Description |
|---|---|
"2.0" | Current stable version |
Services
Define containers and networking.
image
Required. Docker image to deploy.
image: nginx:1.25.3Supports any public registry (Docker Hub, GHCR, GCR, ECR, etc.)
Best Practice: Always specify a version tag (e.g., nginx:1.25.3) instead of using :latest or omitting the tag. This ensures reproducible deployments and prevents unexpected updates.
command & args
Optional. Override container entrypoint.
command: - /bin/sh - -cargs: - | npm startenv
Optional. Environment variables as KEY=value strings.
env: - NODE_ENV=production - DATABASE_URL=postgresql://db:5432/myappexpose
Required. Port exposure configuration. At least one port must be globally exposed.
expose: - port: 80 # Container port (required) as: 80 # External port (default: same as port) proto: tcp # Protocol: tcp or udp (default: tcp) accept: # Accepted hostnames - example.com to: - global: true # Expose to internet (at least one required) http_options: # HTTP-specific options max_body_size: 1048576 read_timeout: 60000 send_timeout: 60000HTTP Options:
| Option | Default | Max | Description |
|---|---|---|---|
max_body_size | 1048576 | 104857600 | Max request body (bytes) |
read_timeout | 60000 | 60000 | Read timeout (ms) |
send_timeout | 60000 | 60000 | Send timeout (ms) |
next_tries | 3 | - | Retry attempts |
next_cases | [error, timeout] | - | When to retry |
credentials
Optional. Private registry authentication.
credentials: host: https://registry.example.com username: user password: passProfiles
Define resources and provider requirements.
compute
cpu
Required. CPU units (1000 = 1 core).
cpu: units: 1.0 # Cores (0.1, 0.5, 1.0, etc.)Limits: Min: 0.01 cores, Max: 384 cores
memory
Required. Memory allocation.
memory: size: 1Gi # RAM (Mi or Gi)Limits: Min: 1Mi, Max: 2Ti
storage
Required. At least one ephemeral storage volume required. Persistent storage is optional.
storage: - size: 1Gi # Ephemeral root volume (required) - name: data # Persistent volume (optional) size: 10Gi attributes: persistent: true # Survives restarts class: beta3 # Performance tierLimits: Min: 5Mi, Max: 32Ti per volume
Classes: default, beta1, beta2, beta3, ram
gpu
Optional. GPU resources.
gpu: units: 1 # Number of GPUs attributes: vendor: nvidia: - model: rtx4090 ram: 24Gi # Optional: filter by VRAM interface: pcie # Optional: pcie or sxmLimits: Max: 24 GPUs per service
Common models: a100, a40, rtx4090, rtx3090, t4, v100, h100
placement
Provider selection and pricing.
placement: akash: attributes: # Optional filters region: us-west pricing: # Required: max bid per service web: denom: uakt amount: 100 # uakt per block (~6 sec)Pricing calculation:
Daily cost = (amount × 14,400 blocks) / 1,000,000 AKTExample: 100 uakt/block = 1.44 AKT/day = ~43 AKT/monthDeployment
Map services to profiles.
deployment: web: # Service name akash: # Placement name profile: web # Compute profile name count: 1 # Number of replicasNote: count cannot be changed after deployment. Max: 50 replicas per service.
Endpoints
Optional. Named IP endpoints for static IPs.
endpoints: myendpoint: kind: ipUse in services:
expose: - port: 1194 to: - global: true ip: myendpointQuick Reference
Minimum viable SDL:
version: "2.0"services: web: image: nginx:1.25.3 expose: - port: 80 as: 80 to: - global: trueprofiles: compute: web: resources: cpu: units: 0.5 memory: size: 512Mi storage: size: 512Mi placement: akash: pricing: web: denom: uakt amount: 100deployment: web: akash: profile: web count: 1Common patterns:
Resource Limits (per service):
| Resource | Minimum | Maximum |
|---|---|---|
| CPU | 0.01 cores | 384 cores |
| Memory | 1Mi | 2Ti |
| Storage | 5Mi | 32Ti (per volume) |
| GPU | 0 (optional) | 24 units |
| Replicas (count) | 1 | 50 |
See also: