Redis
Cache data and power queues with a Redis server.
- cache
- queue
Guides: Run tests against real services, Connect to a database from outside
Run it
briq run redisbriq_run({ recipe: "redis", wait: true })curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "redis",
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "REDIS_URL": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"stack: app
services:
redis:
recipe: redis
# its defaults, each a field you can set:
# image: redis:7-alpine
# size: nanoFields
| Name | Type | Options | Default |
|---|---|---|---|
| image | string | — | "redis:7-alpine" |
| env | record | { key: string | { secret, value?, literal?, scope?, hosts?, locations? } } | {} |
| cmd | string | string[] | — | — |
| size | enum | pico, micro, nano, small, medium, large, xlarge | "nano" |
| files | record | { key: string | { base64 } } | — |
| egress | object | { hosts } | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- REDIS_URL
- redis://default:<REDIS_PASSWORD>@redis.<stack>.internal:6379
- REDIS_PASSWORD
- <REDIS_PASSWORD>
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| redis | redis:7-alpine | 6379 | nano | — |
When to use it
- Your app or worker expects
REDIS_URL: caching, sessions, rate limiting, queues. - You are testing BullMQ, Sidekiq-style or Celery-style workers against a real broker.
Tips
- A password, no volume.
REDIS_URLcarries the password. Redis saves to its disk when it stops, so data usually survives a stop, but keep nothing there you cannot rebuild. - Pair it with the app in one stack and pass
REDIS_URLto it. - Inspect it with
briq_exec:["sh", "-c", "REDISCLI_AUTH=$REDIS_PASSWORD redis-cli info memory"]. - Connect from outside:
briq_exposeport 6379 withprotocol: "redis"gives arediss://URL.redis-clineeds--tls --sni <host>. See Connect to a database from outside. - Queues with a UI:
redis-bullmq.