Redis
Redis is the job, queue, and state backend for the Code Interpreter. Its REDIS_* keys in config/.env, persistence, the connection URL, and links to the official Redis docs.
Redis is the job/queue and state backend for the
Code Interpreter (codeapi). It
coordinates sandbox execution and holds session/cache state used by the codeapi
services.
Overview
| Compose file | config/codeapi.compose.yml (bundled with the code interpreter) |
| Service name | redis (container intelliask-redis) |
| Image variable | REDIS_IMAGE (e.g. redis:7-alpine) |
| Exposed | internal only |
| Data | bind-mounted at ${STORAGE_ROOT}/redis → /data |
| Consumed by | the codeapi services via REDIS_HOST / REDIS_PORT |
Environment variables
Redis's settings use the REDIS_ prefix in config/.env:
| Variable | Default | What it does |
|---|---|---|
REDIS_IMAGE | redis:7-alpine | Image + tag to run. |
REDIS_CPUS | 0.25 | CPU ceiling. |
REDIS_MEMORY | 96m | Memory ceiling. |
REDIS_HOST | redis | Host the codeapi services connect to. |
REDIS_PORT | 6379 | Port the codeapi services connect to. |
REDIS_PASSWORD | (empty) | Password, if the Redis instance requires one. |
Where the Redis connection is consumed
The REDIS_HOST / REDIS_PORT / REDIS_PASSWORD keys are read by the
Code Interpreter services, not by
Redis itself. Keep the host/port (redis:6379) in sync with this service.
After editing any REDIS_* value, apply with:
Persistence
Redis data is bind-mounted at ${STORAGE_ROOT}/redis, so cache/session state
survives container restarts. The Code Interpreter treats Redis as hot storage
and archives longer-lived generated files to S3, so a Redis reset only
loses in-flight sessions — not stored files. For durability tuning (RDB snapshots vs
AOF), see the official persistence guide below.
Resource limits
The defaults (REDIS_CPUS=0.25, REDIS_MEMORY=96m) suit the Code Interpreter's
coordination workload. If you run a large warm pool or heavier workloads, give
Redis more memory and watch docker stats.
Updating Redis
Official documentation
Last updated on