Cloud Deployment
Reference patterns for deploying Dockrion images to major cloud platforms.
Note:
dockrion deployis not yet implemented. For now, build locally withdockrion buildand deploy the Docker image using your cloud provider’s tools.
What the Image Needs at Runtime
Section titled “What the Image Needs at Runtime”| Requirement | How to provide |
|---|---|
| Environment variables (secrets) | Cloud provider’s secrets management |
| Port 8080 exposed | Container port mapping |
| Health check endpoint | GET /health returns 200 when running |
| Readiness probe | GET /ready returns 200 when agent is loaded |
AWS ECS / Fargate
Section titled “AWS ECS / Fargate”{ "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 } } ]}- Push image to ECR:
docker tag dockrion/my-agent:v1.0.0 <ecr-url>:v1.0.0 && docker push <ecr-url>:v1.0.0 - Create task definition with the container config above
- Configure secrets via AWS Secrets Manager
- Create a service with an ALB target group pointing to port 8080
Google Cloud Run
Section titled “Google Cloud Run”# Push to Artifact Registrydocker tag dockrion/my-agent:v1.0.0 \ us-central1-docker.pkg.dev/PROJECT/repo/my-agent:v1.0.0docker push us-central1-docker.pkg.dev/PROJECT/repo/my-agent:v1.0.0
# Deploygcloud 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-central1Cloud Run automatically uses the container’s port and health check. For secrets, use --set-secrets with Secret Manager:
gcloud run deploy my-agent \ --set-secrets OPENAI_API_KEY=openai-key:latestAzure Container Apps
Section titled “Azure Container Apps”# Push to ACRaz acr login --name myregistrydocker tag dockrion/my-agent:v1.0.0 myregistry.azurecr.io/my-agent:v1.0.0docker push myregistry.azurecr.io/my-agent:v1.0.0
# Create container appaz 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-keyHealth Check Configuration
Section titled “Health Check Configuration”All cloud platforms support health checks. Point them at:
| Probe | Endpoint | Expected |
|---|---|---|
| Liveness | GET /health | 200 (always, if process is alive) |
| Readiness | GET /ready | 200 only when agent adapter is loaded |
| Startup | GET /ready | 200 (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 →