Skip to content

Commit 69f3da0

Browse files
iammukeshmclaude
andcommitted
feat(infra): switch Redis to Valkey + add RedisInsight cache browser
Valkey 8 (BSD-3, the Linux Foundation Redis fork) replaces the source-available Redis image across Aspire and both compose files. Drop-in: the kit uses only StackExchange.Redis over RESP (cache, data protection, SignalR backplane, quota) with no Redis Stack modules, and Hangfire is on Postgres. Resource/service name stays "redis" so connection strings and config keys do not churn. - AppHost: AddRedis(...).WithImage("valkey/valkey","8") + .WithRedisInsight() (auto-wired cache browser; SSPL but dev-only). The valkey image ships redis-* symlinks and supports Aspire's TLS command, so the Redis integration works unmodified. - docker-compose.yml (dev): valkey/valkey:8-alpine. - deploy/docker (prod): valkey/valkey:8-alpine + valkey-server/valkey-cli. Verified by booting Aspire: Valkey starts clean (tcp+tls listeners), authenticated PING returns PONG, RedisInsight comes up auto-connected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 999bfc4 commit 69f3da0

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

deploy/docker/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ services:
3131
# - "5432:5432"
3232

3333
redis:
34-
image: redis:7-alpine
34+
image: valkey/valkey:8-alpine
3535
container_name: fsh-redis
3636
restart: unless-stopped
3737
command:
38-
- redis-server
38+
- valkey-server
3939
- --requirepass
4040
- ${REDIS_PASSWORD:?REDIS_PASSWORD is required}
4141
- --appendonly
4242
- "yes"
4343
volumes:
4444
- redis_data:/data
4545
healthcheck:
46-
test: ["CMD-SHELL", "redis-cli -a $$REDIS_PASSWORD PING | grep PONG"]
46+
test: ["CMD-SHELL", "valkey-cli -a $$REDIS_PASSWORD PING | grep PONG"]
4747
interval: 5s
4848
timeout: 3s
4949
retries: 12

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
- postgres-data:/var/lib/postgresql/data
1616

1717
redis:
18-
image: redis:7-alpine
18+
image: valkey/valkey:8-alpine
1919
ports:
2020
- "6379:6379"
2121

src/Host/FSH.Starter.AppHost/AppHost.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,20 @@
1818

1919
var postgres = postgresServer.AddDatabase("fsh-db");
2020

21+
// Valkey (BSD-3, the Linux Foundation's Redis fork) via Aspire's Redis
22+
// integration. Drop-in over RESP: the kit uses only StackExchange.Redis
23+
// (cache, data protection, SignalR backplane, quota) with no Redis Stack
24+
// modules, and Hangfire is on Postgres — so nothing is Redis-specific.
25+
// Resource name stays "redis" so connection strings / config keys don't churn.
2126
var redis = builder.AddRedis("redis")
27+
.WithImage("valkey/valkey", "8")
2228
.WithDataVolume("fsh-redis-data")
23-
.WithLifetime(ContainerLifetime.Persistent);
29+
.WithLifetime(ContainerLifetime.Persistent)
30+
// RedisInsight cache browser — Aspire auto-wires it to the resource above,
31+
// so it connects to Valkey with no manual config. It's SSPL (source-available),
32+
// but as a dev-only tool that's never redistributed the licensing impact is nil.
33+
// Prefer a strictly-MIT toolchain? Swap to .WithRedisCommander().
34+
.WithRedisInsight();
2435

2536
// Build a plain TCP (non-TLS) Redis connection string using the secondary endpoint.
2637
// Aspire 13.x enables TLS on the primary Redis port by default; the secondary endpoint is plain TCP.

0 commit comments

Comments
 (0)