Deploy on git push (Gyro Pipeline)
Connect a repository: every push builds the Dockerfile and rolls the service out without downtime.
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"web","provider":"github","repo":"https://github.com/gyro-ornek/uygulama","branch":"main","auto":true,"image":"web","targets":["web"]}'gyro container pipeline create 12345 --name web --provider github --repo https://github.com/gyro-ornek/uygulama --branch main --auto --image web --targets webresource "gyro_container_pipeline" "web" {
service_id = 12345
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
branch = "main"
image = "web"
targets = ["web"]
}
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }Add webhook_url and webhook_secret from the answer to the repository webhook (GitHub: application/json, push event). Private repository: send a read-only token, or use an SSH address with a deploy key. Without a repository: "provider":"archive" and upload an archive.
Start a run by hand and follow it#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/7/runs -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -d '{}'
curl -s https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipeline-runs/42/logs -H "Authorization: Bearer $GYRO_TOKEN"gyro container pipeline run 12345 7
gyro container pipeline run-get 12345 42Multi-stage Dockerfile: build_target (--target). Unhealthy new version: auto_rollback returns to the previous one.