Deploy an HTTP container with flags

An HTTP container is a long-running service that accepts incoming requests on a port. Pick this type when you're deploying an API, a web app, or anything else that fronts traffic.

Updated 23 Jun 20263 min read

An HTTP container is a long-running service that accepts incoming requests on a port. Pick this type when you're deploying an API, a web app, or anything else that fronts traffic.

This guide covers the flag-mode flow. For the equivalent driven from a YAML file, see Deploy an HTTP container with YAML.

Minimal create

reis container:create \
  --type http \
  --name "Web API" \
  --handle web-api \
  --image ghcr.io/myorg/api:v1.0.0 \
  --port 8080 \
  --healthcheck /healthz \
  --regions falkenstein-1

That's enough to ship an HTTP container with sensible defaults for CPU, memory, and replicas.

A more typical deploy

A realistic create — multi-region, env vars, secrets, autoscaling, and a custom image registry:

reis container:create \
  --type http \
  --name "Web API" \
  --handle web-api \
  --image ghcr.io/myorg/api:v1.0.0 \
  --project my-project \
  --registry ghcr \
  --port 8080 \
  --healthcheck /healthz \
  --cpu 500 \
  --memory 512 \
  --replicas 2 \
  --max_replicas 8 \
  --regions falkenstein-1 \
  --regions virginia-1 \
  --env NODE_ENV=production \
  --env LOG_LEVEL=info \
  --secrets DB_PASSWORD=db-password \
  --secrets API_KEY=api-key

--max_replicas automatically enables autoscaling between --replicas and --max_replicas.

Flag reference

Identity and routing

FlagDescription
--nameDisplay name (required)
--handleImmutable handle (required)
--imageImage reference with tag (required)
--type httpSelects the HTTP type (default)
--projectProject handle the container belongs to
--registryRegistry handle for private images
--regions (-r)Active region — repeatable

Workload

FlagDescription
--portContainer port (default 8080)
--healthcheckHealth check HTTP path (default /healthz)
--cpuMin CPU in millicores (default 350)
--memoryMin memory in MB (default 150)
--env (-e)KEY=value — repeatable
--secrets (-s)ENV_NAME=secret-handle — repeatable

Scaling

FlagDescription
--replicasMin instances (default 1)
--max_replicasMax instances — enables autoscaling

Observability

FlagDescription
--prometheus_portPort serving Prometheus metrics
--prometheus_pathHTTP path to scrape (default /metrics)

Interactive create

Omit any required flag and Reis walks you through it:

reis container:create

You'll be prompted for the name, handle, type, image, project, registry, regions, sizing, autoscaling, env vars, and secrets — fetching the available options live from the API.

Updating an HTTP container

container:update accepts every create flag except --type (which is immutable) and applies only the flags you pass — everything else is preserved.

# Bump the image
reis container:update web-api --image ghcr.io/myorg/api:v1.1.0
 
# Resize
reis container:update web-api --cpu 1000 --memory 1024
 
# Change autoscaling caps
reis container:update web-api --replicas 3 --max_replicas 12