Run a container service
Order a Gyro Containers environment in Istanbul and publish a Docker image with HTTPS.
1. Order an environment#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
-d '{"plan":"mini-1-1","name":"gyro-proje","confirm":true}'gyro container create --plan mini-1-1 --name gyro-proje --yesPlans: GET /cloud/containers/plans (dedicated mini-1-1 … pro, or serverless). Usage is charged hourly from the balance.
2. Create a public service#
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services \
-H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"web","image":"ghcr.io/gyro-ornek/web:1.0","port":8080,"public":true,"health_path":"/healthz"}'gyro container service create 12345 --name web --image ghcr.io/gyro-ornek/web:1.0 --port 8080 --public --health-path /healthzresource "gyro_container_service" "web" {
service_id = 12345 # container environment
name = "web"
image = "ghcr.io/gyro-ornek/web:1.0"
port = 8080
public = true
health_path = "/healthz"
}
output "url" { value = gyro_container_service.web.url }The answer contains the HTTPS address (<name>-<code>.gyroapp.net). Containers run as a non-root user: use a port ≥ 1024. Services of one environment reach each other at <service>:80.