Kapsayıcı servisi çalıştırma
İstanbul'da bir Gyro Kapsayıcı ortamı alın ve Docker imajınızı HTTPS ile yayınlayın.
1. Ortam sipariş edin#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"plan":"mini-1-1","name":"gyro-proje","confirm":true}'gyro container create --plan mini-1-1 --name gyro-proje --yesPaketler: GET /cloud/containers/plans (ayrılmış mini-1-1 … pro ya da serverless). Kullanım bakiyeden saatlik düşülür.
2. İnternete açık servis oluşturun#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"web","image":"ghcr.io/gyro-ornek/web:1.0","port":8080,"public":true,"health_path":"/healthz"}'gyro container service create 12345 --name web --image ghcr.io/gyro-ornek/web:1.0 --port 8080 --public --health-path /healthzresource "gyro_container_service" "web" {
service_id = 12345 # kapsayıcı ortamı
name = "web"
image = "ghcr.io/gyro-ornek/web:1.0"
port = 8080
public = true
health_path = "/healthz"
}
output "url" { value = gyro_container_service.web.url }Yanıtta HTTPS adresi gelir (<ad>-<kod>.gyroapp.net). Kapsayıcılar kök olmayan kullanıcıyla çalışır: 1024 ve üstü port kullanın. Aynı ortamın servisleri birbirine <servis>:80 ile ulaşır.
Sonraki adım: Gyro Pipeline ile her git push'ta yayınlayın.