Templates
Infrastructure-as-code templates for repeatable deployments. Templates define applications, databases, volumes, and their configuration as YAML. They can be created manually, generated from existing workloads, or converted from Docker Compose files.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/templates | List templates |
POST | /api/v1/templates | Create template |
GET | /api/v1/templates/:id | Get template |
PUT | /api/v1/templates/:id | Update template |
DELETE | /api/v1/templates/:id | Delete template |
Import & Export
| Method | Path | Description |
|---|---|---|
GET | /api/v1/templates/:id/export | Export as JSON |
POST | /api/v1/templates/import | Import from JSON |
POST | /api/v1/templates/validate | Validate template YAML |
POST | /api/v1/templates/convert-compose | Convert Docker Compose to template |
POST | /api/v1/templates/from-workloads | Create from existing workloads |
Deploy
| Method | Path | Description |
|---|---|---|
POST | /api/v1/templates/:id/instantiate | Deploy a template |
Instances
| Method | Path | Description |
|---|---|---|
GET | /api/v1/template-instances | List template instances |
GET | /api/v1/template-instances/:id | Get instance |
DELETE | /api/v1/template-instances/:id | Delete instance |
POST /api/v1/templates
{
"name": "full-stack",
"display_name": "Full Stack App",
"description": "Next.js app with PostgreSQL and Redis",
"icon": "layers",
"color": "#8B5CF6",
"tags": ["nextjs", "postgres", "redis"],
"content": "YAML template definition"
}POST /api/v1/templates/:id/instantiate
Deploy all resources defined in a template:
{
"project_id": "uuid",
"environment_id": "uuid",
"server_id": "uuid",
"variables": {
"APP_NAME": "my-app",
"DB_PASSWORD": "securepassword",
"DOMAIN": "app.example.com"
}
}POST /api/v1/templates/convert-compose
Convert a Docker Compose file to a Launcher template:
{
"content": "version: '3'\nservices:\n web:\n image: nginx\n ports:\n - '80:80'"
}Last updated on