Gyro Kapsayıcı (ECS), İstanbul tr-ist-1: Docker imajlarını size ayrılmış düğüm havuzunda çalıştırın. Kesintisiz dağıtım, sürüm geçmişi ve geri alma, ölçekleme, ortam değişkenleri ve şifreli gizli değerler, <ad>-<kod>.gyroapp.net HTTPS adresi ve kendi alan adlarınız (ücretsiz sertifika), loglar ve grafikler.
Kapsayıcı servislerini listeleKapsam: services_readtyped_get_containers__id__servicesBu işlemin OpenAPI parçası
Ortamdaki servisler: durum, hazır/istenen örnek, boyut, genel adres. Her öğede internal_address (portu olan servisler), listede namespace ve cluster_dns bulunur. Her serviste üst düzeyde alerts = {"min_ready": N} vardır (0 = kapalı; spec.alerts ile aynı).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Kapsayıcı servisi oluşturKapsam: services_writetyped_post_containers__id__servicesBu işlemin OpenAPI parçası
Size ayrılmış düğüm havuzunda yeni servis başlatır. Ad: küçük harf, rakam, '-', en çok 40. Havuzda yer yoksa 409 quota_exceeded. Gizli değerler ayrıca (PUT .../secrets). Sunucusuz ortam:cpu_m / memory_miGET /cloud/billing/container-sizes çiftlerinden biri olmalı (0,25-4 vCPU); ücret çalışan kopya başına saatliktir (POST /cloud/billing/estimate, type: serverless). Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
İstek gövdesi
Alan
Tür
Açıklama
namezorunlu
string
Service name
imagezorunlu
string
Image reference, e.g. ghcr.io/acme/web:1.4 (public registries or your private registry)
port
integer
Container port (0 = no network port). Containers run as a non-root user: use a port >= 1024
replicas
integer
Number of instances (default 1)
cpu_m
integer
CPU per instance in millicores (250 = 0.25 vCPU)
memory_mi
integer
Memory per instance in MiB
public
boolean
HTTPS address <name>-<code>.gyroapp.net (and your domains)
health_path
string
HTTP health check path (empty = TCP check)
args
array<string>
Arguments for the image's default command. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
command
array<string>
Override the image entrypoint. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
env
object
Plain environment variables (replaces the whole set on update)
run_as_user
integer
User id inside the container (default 10001)
autoscaling
object
Autoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabled
boolean
autoscaling.min
integer
autoscaling.max
integer
<= plan replica limit
autoscaling.cpu_percent
integer
autoscaling.memory_percent
integer
0 = off, else 10-95
alerts
object
Alert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_ready
integer
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container service create 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
Kapsayıcı servisini getirKapsam: services_readtyped_get_containers__id__services__nameBu işlemin OpenAPI parçası
Tanım, durum, sorun kodu, örnekler, sürüm, alan adları ve gizli değer adları (değerler asla dönmez). Yanıtta namespace ve portu olan servislerde internal = {host, short, port: 80, target_port, address, url} bulunur: aynı ortamdaki servisler internal.address (<ad>.<namespace>.svc.cluster.local:80) ya da <ad>:80 ile ulaşır. Her serviste üst düzeyde alerts = {"min_ready": N} vardır (0 = kapalı; spec.alerts ile aynı).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
Yanıtlar
200
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Yeni sürüm dağıt / ayar değiştirKapsam: services_writetyped_patch_containers__id__services__nameBu işlemin OpenAPI parçası
Yalnız değişecek alanları gönderin (ör. image). replicas dışındaki her değişiklik yeni sürüm oluşturur ve kesintisiz dağıtılır. Sunucusuz ortam:cpu_m / memory_miGET /cloud/billing/container-sizes çiftlerinden biri olmalı (0,25-4 vCPU); ücret çalışan kopya başına saatliktir (POST /cloud/billing/estimate, type: serverless). Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
image
string
Image reference, e.g. ghcr.io/acme/web:1.4 (public registries or your private registry)
port
integer
Container port (0 = no network port). Containers run as a non-root user: use a port >= 1024
replicas
integer
Number of instances (default 1)
cpu_m
integer
CPU per instance in millicores (250 = 0.25 vCPU)
memory_mi
integer
Memory per instance in MiB
public
boolean
HTTPS address <name>-<code>.gyroapp.net (and your domains)
health_path
string
HTTP health check path (empty = TCP check)
args
array<string>
Arguments for the image's default command. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
command
array<string>
Override the image entrypoint. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
env
object
Plain environment variables (replaces the whole set on update)
run_as_user
integer
User id inside the container (default 10001)
reason
string
Free text shown in the revision history (e.g. a git sha)
autoscaling
object
Autoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabled
boolean
autoscaling.min
integer
autoscaling.max
integer
<= plan replica limit
autoscaling.cpu_percent
integer
autoscaling.memory_percent
integer
0 = off, else 10-95
alerts
object
Alert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_ready
integer
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container service update 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
gyro container service delete 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
Servisi ölçekleKapsam: services_writetyped_post_containers__id__services__name__scaleBu işlemin OpenAPI parçası
Örnek sayısını ayarlar (0 = durdur). Sürüm oluşturmaz. Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
replicaszorunlu
integer
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container service scale 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
gyro container service restart 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/restart", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
Önceki sürüme dönKapsam: services_writetyped_post_containers__id__services__name__rollbackBu işlemin OpenAPI parçası
revision sürümünün (varsayılan bir önceki) imaj, boyut, komut ve değişkenlerini yeni sürüm olarak geri getirir. Kopya sayısı ve gizli değerler değişmez. "confirm": true gerekir.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
revision
integer
Revision number (empty = previous)
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container service rollback 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/revisions", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/revisions", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Ortam değişkenlerini ayarlaKapsam: services_writetyped_put_containers__id__services__name__envBu işlemin OpenAPI parçası
set değişken ekler/günceller ({"KEY":"değer"} ya da KEY=VALUE satırları), unset siler, replace: 1 tümünü değiştirir. Sürüm oluşturur, servis yeniden başlar. Yalnız set, unset ve replace kabul edilir: bilinmeyen alan (ör. env) ya da hiçbir şeyi değiştirmeyen gövde (set, unset, replace: 1 yok) 422 invalid_env ile reddedilir (details.expected beklenen alanları verir); hiçbir şey kaydedilmez, servis yeniden başlamaz.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
set
object
unset
array<string>
replace
integer (0, 1)
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
invalid_env: unknown field or nothing to change (details.expected lists set / unset / replace)
gyro container env set 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
gyro container secret set 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
gyro container secret delete 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/secrets", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/logs", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/logs", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/metrics", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/metrics", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/domains", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/domains", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Alan adı bağlaKapsam: services_writetyped_post_containers__id__services__name__domainsBu işlemin OpenAPI parçası
Önce CNAME kaydını servis adresine (<ad>-<kod>.gyroapp.net) yönlendirin; DNS bize gösterince ücretsiz sertifikayla etkinleşir (saatlik ya da .../domains/verify ile).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
domainzorunlu
string
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container domain add 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
gyro container domain verify 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/domains/verify", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
gyro container domain remove 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/domains/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
Servisin otomatik ölçekleme / uyarı eşiğiKapsam: services_writetyped_put_containers__id__services__name__autoscalingBu işlemin OpenAPI parçası
Gövde {"autoscaling": {...}, "alerts": {"min_ready": 2}}. Ortalama kullanım hedefi aşınca kopya eklenir (30 sn'de en çok iki katı), 3 dakika sakin kalınca dakikada bir azaltılır. En çok kopya paket sınırını aşamaz; havuza sığmayan kopyalar bekler. Sürüm oluşturmaz. Kapatınca mevcut kopya sayısı (ya da replicas) kalır. Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
namezorunlu
path
string
Service name
İstek gövdesi
Alan
Tür
Açıklama
autoscaling
object
Autoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabled
boolean
autoscaling.min
integer
autoscaling.max
integer
<= plan replica limit
autoscaling.cpu_percent
integer
autoscaling.memory_percent
integer
0 = off, else 10-95
alerts
object
Alert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_ready
integer
replicas
integer
Fixed replicas when switching autoscaling off
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container service autoscale 12345 --help # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
type = string
sensitive = true
}
resource "gyro_container_service" "web" {
service_id = 123
name = "web"
image = "ghcr.io/acme/web:1.4"
port = 8080
cpu_m = 500
memory_mi = 512
public = true
health_path = "/healthz"
env = { MODE = "prod" }
secrets = { DB_PASSWORD = var.db_password } # write only, never read back
# Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
autoscaling = {
min = 2
max = 6
cpu_percent = 70
}
# Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
notification = {
min_ready = 2
}
# Point a CNAME from your domain to gyro_container_service.web.host first.
domains = ["app.example.com"]
}
output "web_url" {
value = gyro_container_service.web.url
}
Bildirim ayarları ve süren uyarılarKapsam: services_readtyped_get_containers__id__notificationsBu işlemin OpenAPI parçası
settings (kanallar, olaylar, tekrar aralığı; webhook anahtarı dönmez), conditions = şu an süren sorunlar, history = son 30 uyarı. Olaylar: down, crashloop, replicas_low, scale_max, capacity, egress (çıkış IP'leri değişti). Olay ~2 dakika sürünce bildirilir; aynı servis + olay tekrar aralığında bir kez (gidip gelenler dahil), düzelince 'düzeldi' mesajı.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Size ayrılmış düğümler, havuz kapasitesi/kullanımı, kök alan adı A kaydı için IP'ler, özel depo (yalnız kullanıcı). Ayrıca namespace, cluster_dns ve egress (ContainerEgress şeması).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Paketin düğüm boyutunda ek düğüm ekler ya da çıkarır (mutlak extra_nodes, 0 = yalnız paket; ortam başına toplam en çok 20 düğüm, GyroKota düşürebilir). Ek düğüm paketteki düğümle aynı fiyattır, ön ödemeli bakiyeden saatlik düşer. Çıkarma önce boşaltır: kopyalar kalan düğümlere taşınır (servisler sırayla, sağlık kontrollü yeniden başlar), sonra düğüm silinir; boşaltılırken ücretlenmez. Kalan düğümler çalışan servislere yetmiyorsa 409 quota_in_use. Sunucusuz ortamlarda düğüm yoktur. "confirm": true gerekir. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
İstek gövdesi
Alan
Tür
Açıklama
extra_nodeszorunlu
integer
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Kapsayıcı ortamı ayrıntısı (namespace, iç adresleme, çıkış IP'leri)Kapsam: services_readgetContainerEnvironmentBu işlemin OpenAPI parçası
Ortam kodu, Kubernetes namespace adı, iç adresleme (cluster_dns), paket sınırları, düğümler, kota, giriş IP'leri ve güncel çıkış IP'leri. Ayrılmış ortamın çıkış IP'leri = kendi düğümlerinin IP'leri + güncelleme sırasında kullanılan paylaşımlı havuz düğümü (yeni kopya yaklaşık bir dakika orada başlar, sonra düğümünüze döner). Sunucusuz = paylaşımlı yalıtılmış havuz düğümleri (havuz büyürse yeni adres eklenebilir). Gyro Pipeline derleme makineleri ayrı listelenir (build_ips). Düğümler değişince (paket değişimi, düğüm yenileme, havuz ölçeklemesi) liste değişir ve ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı). IPv6 çıkışı yok; TCP 25 kapalı.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
OK — data: ContainerEnvironment
404
Not found — also returned for objects owned by someone else
# veri kaynağı gyro_container_environment: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/container_environment
data "gyro_container_environment" "app" {
service_id = 12345
}
# Egress IPs: put them on the IP allow list of an external service (database, payment provider, partner API).
# They change when the environment's nodes change; the owner is notified and this list is always current.
output "egress_ips" {
value = data.gyro_container_environment.app.egress_ips
}
# Other services of the same environment reach a service at <service>.<namespace>.svc.cluster.local:80 (or <service>:80).
output "api_internal_url" {
value = "http://api.${data.gyro_container_environment.app.service_domain}"
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Kapsayıcı ortamını sil (ön ödemeli)Kapsam: cloud_deletedeleteContainerEnvironmentBu işlemin OpenAPI parçası
Paneldeki Harcamalar > Sil ile aynı: saatlik ücret hemen durur, ortam tüm servis, düğüm, imaj deposu, pipeline ve özel alan adı bağlarıyla hemen silinir (saklama süresi yok). "confirm": true (gövde ya da sorgu) ve Idempotency-Key başlığı gerekir; tekrar çağrı 202 deleted döner. Faturalı ortamlar 409 not_prepaid. Terraform: gyro_container_environment silinince bu çağrılır.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Idempotency-Keyzorunlu
header
string
confirm
query
boolean
İstek gövdesi
Alan
Tür
Açıklama
confirm
boolean
Yanıtlar
202
Deleting — data: object
400
idempotency_key_required
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Kapsayıcıların internete çıktığı güncel IPv4 adresleri - harici bir servisin IP beyaz listesine ekleyin. Ayrılmış ortamın çıkış IP'leri = kendi düğümlerinin IP'leri + güncelleme sırasında kullanılan paylaşımlı havuz düğümü (yeni kopya yaklaşık bir dakika orada başlar, sonra düğümünüze döner). Sunucusuz = paylaşımlı yalıtılmış havuz düğümleri (havuz büyürse yeni adres eklenebilir). Gyro Pipeline derleme makineleri ayrı listelenir (build_ips). Düğümler değişince (paket değişimi, düğüm yenileme, havuz ölçeklemesi) liste değişir ve ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı). IPv6 çıkışı yok; TCP 25 kapalı.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
OK — data: object
404
Not found — also returned for objects owned by someone else
# veri kaynağı gyro_container_environment: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/container_environment
data "gyro_container_environment" "app" {
service_id = 12345
}
# Egress IPs: put them on the IP allow list of an external service (database, payment provider, partner API).
# They change when the environment's nodes change; the owner is notified and this list is always current.
output "egress_ips" {
value = data.gyro_container_environment.app.egress_ips
}
# Other services of the same environment reach a service at <service>.<namespace>.svc.cluster.local:80 (or <service>:80).
output "api_internal_url" {
value = "http://api.${data.gyro_container_environment.app.service_domain}"
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/egress-ips", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/egress-ips", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Çıkış IP değişikliği onay adımıKapsam: services_writesetContainerEgressApprovalBu işlemin OpenAPI parçası
hours 1-72 onay adımını açar (önerilen 24), 0 kapatır. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
İstek gövdesi
Alan
Tür
Açıklama
hourszorunlu
integer
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Bekleyen çıkış IP değişikliğini onaylaKapsam: services_writeapproveContainerEgressChangeBu işlemin OpenAPI parçası
Şimdi devam et: yeni düğümler trafik almaya başlar, eskiler boşaltılıp kaldırılır. id (isteğe bağlı) egress_change.id ile aynı olmalı (yenisi geldiyse 409 change_mismatch). 409 no_pending_change / change_preparing. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
İstek gövdesi
Alan
Tür
Açıklama
id
string
confirm
boolean
Yanıtlar
202
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Ortamın Gyro imaj deposuKapsam: services_readtyped_get_containers__id__registryBu işlemin OpenAPI parçası
Depo adresi, imaj öneki <host>/<kod>/, kullanıcı adı, kullanım (2 GB ücretsiz, üst sınır 50 GB), gönderim izni ve temizlik ayarı. Yalnız bu ortam kendi depolarına erişir. 2 GB üstü GB başına aylık 0,05 € (saatlik bakiyeden). Parola yalnız POST .../registry/credentials ile döner.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
Yanıtlar
200
Tool data / result — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
source = "nginxinc/nginx-unprivileged:1.27-alpine"
repo = "web"
tag = "1.27"
}
# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
service_id = 12345
source = "ghcr.io/gyro-ornek/uygulama:1.0"
username = "gyro-ornek"
password = var.ghcr_read_token
}
resource "gyro_container_service" "web" {
service_id = 12345
name = "web"
image = gyro_container_image.web.image
port = 8080
public = true
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/images", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/images", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
gyro container registry image-delete 12345 --help # tüm seçenekler
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
source = "nginxinc/nginx-unprivileged:1.27-alpine"
repo = "web"
tag = "1.27"
}
# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
service_id = 12345
source = "ghcr.io/gyro-ornek/uygulama:1.0"
username = "gyro-ornek"
password = var.ghcr_read_token
}
resource "gyro_container_service" "web" {
service_id = 12345
name = "web"
image = gyro_container_image.web.image
port = 8080
public = true
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/images", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
İmaj içe aktarmaları (ilerleme ve geçmiş)Kapsam: services_readlistContainerImageImportsBu işlemin OpenAPI parçası
active = süren içe aktarma (ya da null): phase, bayt ve katman ilerlemesi; jobs = son 20 içe aktarma (yeniden eskiye), başarısızsa error + message; limits.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Container environment (service) id
Yanıtlar
200
OK — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
source = "nginxinc/nginx-unprivileged:1.27-alpine"
repo = "web"
tag = "1.27"
}
# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
service_id = 12345
source = "ghcr.io/gyro-ornek/uygulama:1.0"
username = "gyro-ornek"
password = var.ghcr_read_token
}
resource "gyro_container_service" "web" {
service_id = 12345
name = "web"
image = gyro_container_image.web.image
port = 8080
public = true
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/imports", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/imports", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Bir imajı (ör. nginx:1.27, ghcr.io/gyro-ornek/uygulama:1.0) docker push gerekmeden ortamın Gyro imaj deposuna kopyalar. Yalnız https depolar; çok mimarili imajlarda yalnız linux/amd64 kopyalanır. repo (varsayılan: kaynak adının son parçası) ve tag (varsayılan: kaynak etiketi) kopyanın adıdır; var olan ad:etiket için overwrite: true gerekir. Özel imaj: username + password (token) yalnız bu kopya için kullanılır, saklanmaz, geri dönmez, API günlüğünde karartılır. Arka planda çalışır: GET .../registry/imports ile izleyin. Sınırlar: ortam başına aynı anda 1 (409 import_running), saatte 10 (429 import_rate_limited), 15 dakika, 128 katman, boyut deponuzdaki boş alanı aşamaz. İç/özel/Gyro altyapı adreslerine çözülen kaynaklar reddedilir (source_blocked).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Container environment (service) id
İstek gövdesi
Alan
Tür
Açıklama
sourcezorunlu
string
source image (host/repo:tag or @sha256:...); docker.io when no host
repo
string
target name under your prefix (lowercase, max 3 levels)
tag
string
target tag (default: source tag, latest for a digest)
username
string
private source: username (not stored)
password
string
private source: token / password (not stored, redacted in logs)
overwrite
boolean
replace an existing name:tag
Yanıtlar
202
OK — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container registry import 12345 --help # tüm seçenekler
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
source = "nginxinc/nginx-unprivileged:1.27-alpine"
repo = "web"
tag = "1.27"
}
# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
service_id = 12345
source = "ghcr.io/gyro-ornek/uygulama:1.0"
username = "gyro-ornek"
password = var.ghcr_read_token
}
resource "gyro_container_service" "web" {
service_id = 12345
name = "web"
image = gyro_container_image.web.image
port = 8080
public = true
}
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Depoyu bağlar. Yanıtta webhook_url ve webhook_secret (yalnız burada ve GET .../webhook) vardır; ikisini deponun webhook ayarına ekleyin. Özel depo için token. providerarchive değilse repo zorunludur (arşiv pipeline'ı yalnız yüklenen arşivi derler: POST .../uploads, ardından upload_id ile çalıştırma).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
İstek gövdesi
Alan
Tür
Açıklama
namezorunlu
string
Display name (1-48)
provider
string (github, gitlab, gitea, git, archive)
repo
string
Required for github / gitlab / gitea / git: https clone URL (no credentials) or SSH address git@host:org/repo.git / ssh://user@host[:port]/path (needs a deploy key). Leave it out for provider archive (an archive pipeline has no repository; a value sent with archive is ignored and the answer shows repo empty).
token
string
Read-only access token for a private repository (stored encrypted, never returned; "-" on update removes it)
git_user
string
User name for the token (default: x-access-token / oauth2 / git)
Read gyro-pipeline.yml from the repository (GitHub, GitLab, Gitea)
imagezorunlu
string
Image name in the environment registry (<registry>/<code>/<image>:<sha7> + :latest)
dockerfile
string
context
string
Build folder (empty = repository root)
build_target
string
Stage of a multi-stage Dockerfile to build (FROM node:20 AS production -> production, same as docker build --target). Empty = the last stage. Stage names are case-insensitive (stored lowercase). A stage the Dockerfile does not have fails the run with build_target_not_found. gyro-pipeline.yml: build_target: overrides it per run. CLI: --target (or --build-target).
targets
array<string>
Services that get the new image (empty = build only)
approval
boolean
Wait for approval before deploying (24 h)
auto_rollback
boolean
Roll back when the new version is unhealthy
build_image
string
Image that runs commands (e.g. node:22-alpine)
commands
array<string>
Shell commands run in the repository root before the Dockerfile (tests, npm ci ...); build secrets are environment variables here
build_env
object
Variables for commands
build_args
object
Dockerfile ARG values (visible in the image history)
gyro container pipeline create 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Yalnız değişecek alanları gönderin. token: yeni değer ya da silmek için "-".
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
pipelinezorunlu
path
string
Pipeline id (p + 8)
İstek gövdesi
Alan
Tür
Açıklama
name
string
Display name (1-48)
provider
string (github, gitlab, gitea, git, archive)
repo
string
Required for github / gitlab / gitea / git: https clone URL (no credentials) or SSH address git@host:org/repo.git / ssh://user@host[:port]/path (needs a deploy key). Leave it out for provider archive (an archive pipeline has no repository; a value sent with archive is ignored and the answer shows repo empty).
token
string
Read-only access token for a private repository (stored encrypted, never returned; "-" on update removes it)
git_user
string
User name for the token (default: x-access-token / oauth2 / git)
Read gyro-pipeline.yml from the repository (GitHub, GitLab, Gitea)
image
string
Image name in the environment registry (<registry>/<code>/<image>:<sha7> + :latest)
dockerfile
string
context
string
Build folder (empty = repository root)
build_target
string
Stage of a multi-stage Dockerfile to build (FROM node:20 AS production -> production, same as docker build --target). Empty = the last stage. Stage names are case-insensitive (stored lowercase). A stage the Dockerfile does not have fails the run with build_target_not_found. gyro-pipeline.yml: build_target: overrides it per run. CLI: --target (or --build-target).
targets
array<string>
Services that get the new image (empty = build only)
approval
boolean
Wait for approval before deploying (24 h)
auto_rollback
boolean
Roll back when the new version is unhealthy
build_image
string
Image that runs commands (e.g. node:22-alpine)
commands
array<string>
Shell commands run in the repository root before the Dockerfile (tests, npm ci ...); build secrets are environment variables here
build_env
object
Variables for commands
build_args
object
Dockerfile ARG values (visible in the image history)
gyro container pipeline update 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
gyro container pipeline delete 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/webhook", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/webhook", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
gyro container pipeline rotate-secret 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/webhook/rotate", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
gyro container pipeline test 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/test", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
gyro container pipeline secret set 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
gyro container pipeline secret delete 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/secrets/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/runs", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/runs", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
ref: dal (main), etiket (tag:v1.2.0) ya da tam ref; sha: isteğe bağlı 40 karakter commit. İkisi yoksa kuraldaki ilk dal derlenir. upload_id verilirse yüklenen arşiv derlenir (arşivlerde gyro-pipeline.yml okunmaz).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
pipelinezorunlu
path
string
Pipeline id (p + 8)
İstek gövdesi
Alan
Tür
Açıklama
ref
string
sha
string
confirm
boolean
upload_id
string
Build an uploaded archive (from POST .../uploads) instead of a git ref
archive_name
string
Shown in the run list
Yanıtlar
200
OK — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container pipeline run 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
15 dakika geçerli, tam size bayt için tek PUT adresi (url) döner (tar.gz / tgz / zip, en çok 200 MB; ör. curl -T site.tar.gz "<url>"). Sonra POST .../runs {"upload_id": ...} ile derleyin. Arşivler 24 saatte silinir.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
pipelinezorunlu
path
string
Pipeline id (p + 8)
İstek gövdesi
Alan
Tür
Açıklama
sizezorunlu
integer
archive size in bytes (1 - 209715200)
confirm
boolean
Yanıtlar
200
OK — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container pipeline upload 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
SSH deposu için ed25519 anahtar çifti üretir, yalnız açık anahtarı döner (depoya salt okuma deploy key olarak ekleyin). Özel anahtar şifreli saklanır, hiç dönmez. "rotate": true yeniler.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Service id
pipelinezorunlu
path
string
Pipeline id (p + 8)
İstek gövdesi
Alan
Tür
Açıklama
rotate
boolean
confirm
boolean
Yanıtlar
200
OK — data: object
404
Not found — also returned for objects owned by someone else
409
State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422
Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
gyro container pipeline deploy-key create 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
gyro container pipeline deploy-key delete 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/deploy-key", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/host-key", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/host-key", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
gyro container pipeline host-key trust 12345 --help # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
service_id = 12345 # container environment (gyro-ecs-1)
name = "web"
repo = "https://github.com/gyro-ornek/uygulama"
token = var.github_read_token # private repository only (read access)
branch = "main"
tags = "v*"
image = "web"
targets = ["web"]
# multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
build_target = "production"
build_args = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)
# optional build step before the Dockerfile (tests ...); secrets are environment variables here
build_image = "node:22-alpine"
commands = ["npm ci", "npm test"]
secrets = { NPM_TOKEN = var.npm_token }
}
# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
value = gyro_container_pipeline.web.webhook_secret
sensitive = true
}
# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
service_id = 12345
name = "api"
repo = "[email protected]:gyro-ornek/api.git"
deploy_key = true
image = "api"
targets = ["api"]
}
# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }
# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
service_id = 12345
name = "site"
git_provider = "archive"
image = "site"
targets = ["web"]
}
Sipariş edilebilir Gyro Kapsayıcı (ECS) ortam paketleri ve ön ödemeli fiyatlar. Paket = 1 ortam (size ayrılmış düğüm havuzu); max_services tanımlanabilecek en fazla uygulama, max_replicas servis başına en fazla kopya; hepsi havuzu paylaşır.
Kapsayıcı ortamı oluştur (toplu)Kapsam: cloud_ordercreateContainerEnvironmentsBu işlemin OpenAPI parçası
Bir paketten 1..N ortamı TEK siparişte açar (quantity, varsayılan 1, istek başına en çok 25). Ön ödemeli: sipariş 0'dır, kullanım saatlik bakiyeden düşer; bakiye her ortamın ilk 24 saatini karşılamalıdır, yeni hesaplar ilk günlerde sınırlıdır. name ({n} ile) ve tags her ortamı adlandırır; project_id projeye koyar. Teklif için "dry_run": true; gerçek sipariş "confirm": true ve Idempotency-Key başlığı ister.
Parametreler
Alan
in
Tür
Açıklama
Idempotency-Keyzorunlu
header
string
Unique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer.
İstek gövdesi
Alan
Tür
Açıklama
plan
string
plan from GET /cloud/containers/plans (mini-1-1, small-1-2, starter, standart, pro, serverless)
product_id
integer
product id instead of plan
quantity
integer
environments to create in one order (--count), default 1, max 25
name
string
name (nickname); {n} = number in a batch
tags
array<string>
tags (max 10)
project_id
integer | null
project (0 = default project)
confirm
boolean
dry_run
boolean
Yanıtlar
200
Dry-run quote
202
Ordered; environments are being set up — data: object
403
Key lacks the scope, IP not allowed, or feature disabled
422
confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors