Use Valkey instead of Redis

Redis 7.4+ is RSALv2/SSPL and 8.0+ adds AGPLv3. None of the three works
for a closed-source commercial cloud service, and SSPL section 13
specifically targets offering the software's functionality as a service,
which is what a control plane does. Valkey is BSD-3-Clause, under the
Linux Foundation, forked from Redis 7.2.4.

Deciding this now rather than after step 3 of PLAN.md stands up real
infrastructure makes it free: Valkey speaks the same RESP protocol, so
`ioredis` is untouched and only names change. `REDIS_URL` becomes
`VALKEY_URL`, the exported client becomes `valkey`, and `/health`
reports a `valkey` field.

Two things deliberately do not change, documented in place so they are
not "fixed" later: the `redis://` URL scheme, which names the wire
protocol and is what every client actually parses (none understands
`valkey://`), and `ioredis` itself, which is a RESP client whose name
refers to the protocol's origin and not to the server we run.

docker-compose.yml is new, pinning valkey/valkey:8-alpine alongside
pgvector/pgvector:pg17 - the plain postgres image lacks the extension
`frame_embeddings` needs. It makes the Valkey choice concrete rather
than a note someone has to remember.
This commit is contained in:
2026-10-03 10:10:28 +00:00
parent 349c4073cd
commit ab093f3136
5 changed files with 69 additions and 11 deletions
+45
View File
@@ -0,0 +1,45 @@
# Local development dependencies for continuum-backend.
#
# Valkey rather than Redis on purpose: Redis 7.4+ is RSALv2/SSPL and 8.0+
# adds AGPLv3, none of which a closed-source commercial product can ship.
# Valkey is BSD-3-Clause and speaks the same RESP protocol, so both clients
# (`ioredis` here, the `redis` crate in continuum-ai-worker) are unchanged.
# See continuum-common/docs/LICENSES.md.
#
# pgCat/PgBouncer is deliberately not here - DATABASE_URL in .env.example
# points at :6432 for production, but talking straight to Postgres on :5432
# is one less moving part locally.
services:
valkey:
image: valkey/valkey:8-alpine
ports:
- "6379:6379"
command: ["valkey-server", "--appendonly", "yes"]
volumes:
- valkey-data:/data
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
retries: 5
postgres:
# pgvector/pgvector ships the extension prebuilt; the plain postgres
# image does not, and `frame_embeddings` needs it.
image: pgvector/pgvector:pg17
ports:
- "5432:5432"
environment:
POSTGRES_USER: continuum
POSTGRES_PASSWORD: continuum
POSTGRES_DB: continuum
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U continuum -d continuum"]
interval: 5s
retries: 5
volumes:
valkey-data:
postgres-data: