Containers
Deploy custom Docker containers with managed infrastructure on elizaOS Cloud.
Beta
Overview
Container deployment provides:
- Custom Runtimes: Run any Docker image
- Auto-scaling: Scale based on load
- Managed Infrastructure: No server management
- Health Monitoring: Automatic health checks
- Logs & Metrics: Built-in observability
Quick Start
Dashboard
Navigate to Dashboard → Containers for the visual interface.
API
curl -X POST "https://cloud.milady.ai/api/v1/containers" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-service",
"image": "myregistry/myimage:latest",
"port": 3000,
"env": {
"NODE_ENV": "production"
}
}'Deploying a Container
Prepare Your Image
Build and push your Docker image to a registry.
Configure Deployment
Set container settings via dashboard or API.
Deploy
Launch your container on elizaOS Cloud.
Monitor
Track logs, metrics, and health status.
Deployment Configuration
{
"name": "my-service",
"image": "myregistry/myimage:latest",
"port": 3000,
"replicas": 2,
"resources": {
"cpu": "0.5",
"memory": "512Mi"
},
"env": {
"NODE_ENV": "production",
"API_KEY": "{{secrets.API_KEY}}"
},
"healthCheck": {
"path": "/health",
"interval": 30,
"timeout": 5
}
}Container Settings
Basic Settings
| Field | Type | Description |
|---|---|---|
name | string | Container name (unique) |
image | string | Docker image URL |
port | integer | Container port to expose |
replicas | integer | Number of instances |
Resources
| Field | Options | Description |
|---|---|---|
cpu | 0.25, 0.5, 1, 2, 4 | CPU cores |
memory | 256Mi, 512Mi, 1Gi, 2Gi, 4Gi | Memory limit |
Environment Variables
{
"env": {
"DATABASE_URL": "postgres://...",
"REDIS_URL": "redis://...",
"SECRET_KEY": "{{secrets.SECRET_KEY}}"
}
}Use {{secrets.NAME}} to reference secrets stored in elizaOS Cloud.
Registry Authentication
Add Credentials
curl -X POST "https://cloud.milady.ai/api/v1/containers/credentials" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"registry": "ghcr.io",
"username": "your-username",
"password": "your-token"
}'Supported Registries
- Docker Hub
- GitHub Container Registry (ghcr.io)
- Google Container Registry (gcr.io)
- AWS ECR
- Custom registries
Health Checks
Configure health monitoring:
{
"healthCheck": {
"type": "http",
"path": "/health",
"port": 3000,
"interval": 30,
"timeout": 5,
"retries": 3,
"startPeriod": 60
}
}Health Check Types
| Type | Description |
|---|---|
http | HTTP GET request to path |
tcp | TCP connection to port |
exec | Run command in container |
Logs & Metrics
View Logs
curl -X GET "https://cloud.milady.ai/api/v1/containers/{id}/logs?lines=100" \
-H "Authorization: Bearer YOUR_API_KEY"Stream Logs
curl -X GET "https://cloud.milady.ai/api/v1/containers/{id}/logs/stream" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: text/event-stream"Get Metrics
curl -X GET "https://cloud.milady.ai/api/v1/containers/{id}/metrics" \
-H "Authorization: Bearer YOUR_API_KEY"{
"cpu": {
"usage": 0.25,
"limit": 1.0
},
"memory": {
"usage": 256000000,
"limit": 536870912
},
"network": {
"rxBytes": 1024000,
"txBytes": 512000
},
"requests": {
"total": 15000,
"errors": 12
}
}Deployments
List Deployments
curl -X GET "https://cloud.milady.ai/api/v1/containers/{id}/deployments" \
-H "Authorization: Bearer YOUR_API_KEY"Rollback
curl -X POST "https://cloud.milady.ai/api/v1/containers/{id}/deployments/{deploymentId}/rollback" \
-H "Authorization: Bearer YOUR_API_KEY"Scaling
Manual Scaling
curl -X PATCH "https://cloud.milady.ai/api/v1/containers/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"replicas": 5}'Auto-scaling
{
"autoscaling": {
"enabled": true,
"minReplicas": 1,
"maxReplicas": 10,
"targetCPU": 70,
"targetMemory": 80
}
}Quotas
Check your container quota:
curl -X GET "https://cloud.milady.ai/api/v1/containers/quota" \
-H "Authorization: Bearer YOUR_API_KEY"{
"containers": {
"used": 3,
"limit": 10
},
"cpu": {
"used": 2.5,
"limit": 8.0
},
"memory": {
"used": "2.5Gi",
"limit": "8Gi"
}
}Pricing
See Billing & Credits for current pricing on CPU, memory, network, and storage.
Best Practices
- Health Checks — Always configure health checks for reliability
- Resource Limits — Set appropriate CPU and memory limits to control costs
- Secrets — Use
{{secrets.NAME}}references for sensitive data - Monitoring — Set up alerts in Dashboard → Analytics for critical metrics