redis
Recipe card from the charly-infrastructure plugin (Images — the deployable catalog).
redis – Redis in-memory data store
Section titled “redis – Redis in-memory data store”Candy Properties
Section titled “Candy Properties”| Property | Value |
|---|---|
| Dependencies | none |
| Ports | 6379 |
| Service | redis (supervisord, priority 20) |
| Install files | plan: |
Environment Variables
Section titled “Environment Variables”| Variable | Value |
|---|---|
REDIS_URL |
redis://127.0.0.1:6379 |
Service Environment (injected into other containers)
Section titled “Service Environment (injected into other containers)”| Variable | Template Value | Resolved Example |
|---|---|---|
REDIS_URL |
redis://{{.ContainerName}}:6379 |
redis://charly-redis:6379 |
Pod-aware: same-container consumers receive redis://localhost:6379, cross-container consumers receive redis://charly-redis:6379. When charly config runs, REDIS_URL is automatically injected into the global charly.yml env for Redis service discovery.
See /charly-image:layer for env_provide field docs.
Packages
Section titled “Packages”The candy is multi-distro:
- RPM (Fedora):
redis(dnf request) → installed asvalkey-compat-redison Fedora 43. The oldredispackage was replaced; dnf resolves the name viaProvides:, butrpm -q redisreturns “not installed”. Anypackage:test must query the real installed name. See/charly-check:checkAuthoring Gotcha #8. - PAC (Arch/CachyOS):
valkey— the Archvalkeypackage provides the Redis server and CLI binaries (/usr/bin/redis-server,/usr/bin/redis-cli), so the same service spec and binary paths work on Arch/CachyOS. Apackage:test on Arch queriesvalkey.
# charly.yml — a box composes redis via an inline candy: list in its bodymy-image: candy: base: fedora candy: [redis]Used In Boxes
Section titled “Used In Boxes”The candy ships 5 deterministic check: steps in its plan:,
baked into the ai.opencharly.description OCI label
(see /charly-check:check for the full schema — this candy is the
gold-standard pattern referenced there). Each step is one inline Op,
and a probe is a check: step:
context: [build](run undercharly check box, viapodman run --rm):redis-binary—/usr/bin/redis-serverexistsredis-cli-binary—/usr/bin/redis-cliexistsredis-package—valkey-compat-redispackage installed (real installed provider on Fedora 43; see Packages note above)
context: [deploy](run undercharly check liveagainst a live service; uses${HOST_PORT:6379}runtime substitution so the steps keep working ifcharly.ymlremaps the host port — host-side tests always use127.0.0.1:${HOST_PORT:N}, not${CONTAINER_IP}):redis-responds—redis-cli -h 127.0.0.1 -p ${HOST_PORT:6379} pingreturnsPONGredis-port-open— TCP dial127.0.0.1:${HOST_PORT:6379}succeeds
Composed-vs-standalone skip behavior: when redis is a sub-candy of
a larger box (e.g. immich-ml) that doesn’t expose port 6379 on the
host, the context: [deploy] steps correctly skip with
unresolved variables: HOST_PORT:6379. No authoring action needed.
Related Skills
Section titled “Related Skills”/charly-immich:immich– primary consumer (depends on redis)/charly-infrastructure:postgresql– often paired with redis in service stacks/charly-check:check– declarative testing framework (this candy is the gold-standard pattern)/charly-image:layer– candy authoring +env_providefield docs/charly-infrastructure:valkey– Remi-repo Valkey 9 package (separate candy; different version than Fedora’s default valkey-compat-redis)
When to Use This Skill
Section titled “When to Use This Skill”Use when the user asks about:
- Redis setup in containers
- Caching or session storage
- Port 6379 service
REDIS_URLconfiguration