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.
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-1That'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
| Flag | Description |
|---|---|
--name | Display name (required) |
--handle | Immutable handle (required) |
--image | Image reference — a tag or digest is required |
--type http | Selects the HTTP type (default) |
--project | Project handle the container belongs to |
--registry | Registry handle for private images |
--regions (-r) | Active region — repeatable |
Networking
| Flag | Description |
|---|---|
--external / --no-external | Required. --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
| Flag | Description |
|---|---|
--port | Container port (default 8080) |
--healthcheck | Health check HTTP path (default /healthz) |
--protocol | Protocol your app speaks on its port: http (default), https or tcp. Used for health checks and for delivering traffic |
--cpu | Min CPU in millicores (default 350) |
--memory | Min memory in MB (default 150) |
--env (-e) | KEY=value — repeatable |
--secrets (-s) | ENV_NAME=secret-handle — repeatable |
Scaling
| Flag | Description |
|---|---|
--replicas | Min instances (default 1) |
--max_replicas | Max instances — enables autoscaling |
Observability
| Flag | Description |
|---|---|
--prometheus_port | Port serving Prometheus metrics |
--prometheus_path | HTTP path to scrape (default /metrics) |
Interactive create
Omit any required flag and Reis walks you through it:
reis container:createYou'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 12Related
- Deploy an HTTP container with YAML — declarative version of this flow
- Deploy a worker with flags — same
container:create, different type - Flag mode overview — repeatable flags, booleans, short aliases