---
title: "Kapsayıcı servisi çalıştırma"
description: "İstanbul'da bir Gyro Kapsayıcı ortamı alın ve Docker imajınızı HTTPS ile yayınlayın."
url: https://www.gyrohosting.com/developers/tr/howto/container-service.html
language: tr
openapi: https://www.gyrohosting.com/developers/openapi.json
api_version: 2.30.0
---

# 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**

```bash
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}'
```

**CLI**

```bash
gyro container create --plan mini-1-1 --name gyro-proje --yes
```

Paketler: `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**

```bash
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"}'
```

**CLI**

```bash
gyro container service create 12345 --name web --image ghcr.io/gyro-ornek/web:1.0 --port 8080 --public --health-path /healthz
```

**Terraform**

```hcl
resource "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](https://www.gyrohosting.com/developers/tr/howto/container-pipeline.md).
