Deployments
Manage compute deployment records and their scaling configuration
To run container workloads, deploy them as a Scalix Run service — that is the supported execution path. The endpoints here manage deployment records and scaling configuration.
Creating a Deployment
Accepted fields: name, image, min_instances, max_instances, env.
bash
curl -X POST https://api.scalix.world/v1/compute/deployments \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "api-server",
"image": "registry.scalix.world/my-org/api:v1.2",
"min_instances": 1,
"max_instances": 3,
"env": { "NODE_ENV": "production" }
}'Listing Deployments
bash
scalix-cloud run listScaling a Deployment
bash
curl -X POST https://api.scalix.world/v1/compute/deployments/$DEPLOYMENT_ID/scale \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "min_instances": 1, "max_instances": 10 }'Deleting a Deployment
Delete by the deployment id returned at create time:
bash
curl -X DELETE https://api.scalix.world/v1/compute/deployments/$DEPLOYMENT_ID \
-H "Authorization: Bearer $SCALIX_API_KEY"Environment Variables
Set environment variables via the env object in the create request:
bash
curl -X POST https://api.scalix.world/v1/compute/deployments \
-H "Authorization: Bearer $SCALIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "api-server",
"image": "registry.scalix.world/my-org/api:v1.2",
"env": { "DATABASE_URL": "postgres://...", "REDIS_URL": "redis://..." }
}'Logs
bash
scalix-cloud logs <deployment-id>