Skip to content

Redis

Curated name redis. Adds a Redis 8 service to the workbench in compose mode, on the default port with a readiness healthcheck.

An in-memory key-value store for local development: caching, sessions, rate limits, queues, pub/sub. It runs without auth, matching a typical local setup.

At init, or to an existing workbench:

Terminal window
monoceros init acme --with-services=redis
monoceros add-service acme redis

Need a second instance (say one for cache, one for a queue)? Add it again under a different name with --as - each gets its own host, data dir, and connection env:

Terminal window
monoceros add-service acme redis --as=queue
Terminal window
monoceros remove-service acme redis

Or delete the service’s block from acme.yml by hand and re-run monoceros apply acme - the yml is the source of truth. (Its data volume monoceros-acme-data-redis is removed with the workbench on monoceros remove, which backs it up first.)

acme.yml
services:
- name: redis # host name in the container + data dir name
image: redis:8
port: 6379 # in-container port (feeds `monoceros tunnel`)
volumes:
- data:/data # the service's own Docker volume
restart: unless-stopped
healthcheck: # workspace waits for service_healthy
test: [CMD, redis-cli, ping]
interval: 10s
timeout: 5s
retries: 5
connectionEnv: # → the workspace env vars below
URL: redis://${host}:${port}
HOST: ${host}
PORT: ${port}

There are no credentials to seed - the default service has no auth (add a password via the service config if you need one).

Monoceros injects a connection env into the workspace container, prefixed with the service name:

VariableValue (defaults)
REDIS_URLredis://redis:6379
REDIS_HOSTredis
REDIS_PORT6379

The prefix is the service name, uppercased, so a second instance added with --as=queue gets QUEUE_URL, … and never collides.