Containers
HTTP, worker and cron workloads — scaling, storage, env vars, health checks and runtime configuration.
13 articles
Basic Authentication
Bahriya can protect an HTTP container's ingress with HTTP Basic Authentication. Any request reaching the container must include a valid Authorization: Basic ... header — Bahriya rejects everything else with 401 Unauthorized.
3 minContainers
A container is a running instance of an OCI-compliant container image deployed and managed by Bahriya. It is the primary resource you interact with — configuring it tells Bahriya what to run, where to run it, and how to expose it.
2 minCron Jobs
Cron jobs run your container on a schedule. The container starts, runs to completion, and exits. Bahriya keeps a history of past runs and shows you the exit code and logs for each one.
4 minEnvironment Variables
Bahriya provides two ways to pass configuration into your container at runtime: plain environment variables and secrets.
2 minEphemeral Storage
Every container on Bahriya ships with a small amount of fast, local scratch space called ephemeral storage. It's automatically attached to every replica with no setup required — you write files to the container's filesystem and they go here.
2 minHealth Checks and Bootstrap Time
Bahriya uses health checks to determine whether your container is running correctly. If a health check fails repeatedly, the container is restarted automatically. This keeps your application available without manual intervention.
3 minHTTP Containers
HTTP containers are long-running services that accept incoming HTTP traffic. Use them for APIs, web apps, dashboards, and anything that listens on a port and serves requests.
4 minInit Jobs
Init jobs run to completion before your HTTP container starts. They share the same project's secrets, registries, and volumes — making them ideal for one-shot setup tasks every time a new replica or region comes up.
3 minPersistent Storage
Persistent storage gives your container a place to keep state that survives restarts, redeploys, and rescheduling. Bahriya provisions this storage as replicated block SSD storage — every byte you write is kept in three independent copies behind the scenes so a single disk failure can't take your data offline.
2 minPrometheus Metrics
Bahriya can scrape a Prometheus-compatible metrics endpoint from your container and display the collected metrics in the console. This works for both HTTP containers and worker containers — any container that exposes a /metrics endpoint (or similar) can use this feature.
3 minRate Limiting and IP Rules
Bahriya lets you control who can access your HTTP containers and how much traffic they can send. You can configure rate limiting, IP allow lists, and IP deny lists per container.
3 minResources and Autoscaling
Bahriya gives you fine-grained control over how much compute your container uses and how it scales under load.
2 minWorker Containers
A worker container runs background processes — queue consumers, scheduled tasks, data pipelines, or anything that does not serve HTTP traffic directly. Workers are a container type alongside the default HTTP type.
3 min