Deploy an HTTP container with flags

Deploy an HTTP container on Bahriya with Reis flags: image, port, healthcheck, regions, autoscaling and secrets, from a minimal create to a full deploy.

Updated 9 Nov 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 \
  --external \
  --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. --external is required: use --no-external instead to keep the container reachable only by the project's other workloads.

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 \
  --external \
  --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 — a tag or digest is required
--type httpSelects the HTTP type (default)
--projectProject handle the container belongs to
--registryRegistry handle for private images
--regions (-r)Active region — repeatable

Networking

FlagDescription
--external / --no-externalRequired. --external makes the container reachable from the internet at its hostnames; --no-external keeps it reachable only by workloads in the same project

Reis refuses to create an HTTP container without one of these flags. If an HTTP container is created through the API directly without it, the API makes the container reachable from the internet.

Workload

FlagDescription
--portContainer port (default 8080)
--healthcheckHealth check HTTP path (default /healthz)
--protocolProtocol your app speaks on its port: http (default), https or tcp. Used for health checks and for delivering traffic
--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, port, health check, whether the container is reachable from the internet (default: no), 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