Skip to content

Cloud Deployment

Reference patterns for deploying Dockrion images to major cloud platforms.

Note: dockrion deploy is not yet implemented. For now, build locally with dockrion build and deploy the Docker image using your cloud provider’s tools.

RequirementHow to provide
Environment variables (secrets)Cloud provider’s secrets management
Port 8080 exposedContainer port mapping
Health check endpointGET /health returns 200 when running
Readiness probeGET /ready returns 200 when agent is loaded
{
"containerDefinitions": [
{
"name": "agent",
"image": "your-ecr-repo/dockrion/my-agent:v1.0.0",
"portMappings": [
{ "containerPort": 8080, "protocol": "tcp" }
],
"environment": [
{ "name": "OPENAI_API_KEY", "valueFrom": "arn:aws:secretsmanager:..." }
],
"healthCheck": {
"command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"],
"interval": 30,
"timeout": 5,
"retries": 3
}
}
]
}
  1. Push image to ECR: docker tag dockrion/my-agent:v1.0.0 <ecr-url>:v1.0.0 && docker push <ecr-url>:v1.0.0
  2. Create task definition with the container config above
  3. Configure secrets via AWS Secrets Manager
  4. Create a service with an ALB target group pointing to port 8080
Terminal window
# Push to Artifact Registry
docker tag dockrion/my-agent:v1.0.0 \
us-central1-docker.pkg.dev/PROJECT/repo/my-agent:v1.0.0
docker push us-central1-docker.pkg.dev/PROJECT/repo/my-agent:v1.0.0
# Deploy
gcloud run deploy my-agent \
--image us-central1-docker.pkg.dev/PROJECT/repo/my-agent:v1.0.0 \
--port 8080 \
--set-env-vars OPENAI_API_KEY=sk-... \
--allow-unauthenticated \
--region us-central1

Cloud Run automatically uses the container’s port and health check. For secrets, use --set-secrets with Secret Manager:

Terminal window
gcloud run deploy my-agent \
--set-secrets OPENAI_API_KEY=openai-key:latest
Terminal window
# Push to ACR
az acr login --name myregistry
docker tag dockrion/my-agent:v1.0.0 myregistry.azurecr.io/my-agent:v1.0.0
docker push myregistry.azurecr.io/my-agent:v1.0.0
# Create container app
az containerapp create \
--name my-agent \
--resource-group mygroup \
--environment myenv \
--image myregistry.azurecr.io/my-agent:v1.0.0 \
--target-port 8080 \
--ingress external \
--env-vars OPENAI_API_KEY=secretref:openai-key

All cloud platforms support health checks. Point them at:

ProbeEndpointExpected
LivenessGET /health200 (always, if process is alive)
ReadinessGET /ready200 only when agent adapter is loaded
StartupGET /ready200 (with longer initial delay for agent loading)

Recommended settings:

  • Initial delay: 10–30 seconds (agent loading time)
  • Interval: 30 seconds
  • Timeout: 5 seconds
  • Failure threshold: 3

Previous: 5.6 Docker Build | Next: 5.8 Troubleshooting →