mirror of
https://github.com/germondai/trawl.git
synced 2026-08-17 12:11:23 +02:00
chore(infra): swap Redis for Dragonfly across compose files
This commit is contained in:
@@ -43,6 +43,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
source without needing to restart the browser.
|
||||
|
||||
### Changed
|
||||
- Default cache backend switched from Redis to [Dragonfly](https://www.dragonflydb.io/)
|
||||
in all Docker Compose configs (`docker-compose.yml`, `.full.yml`, `.prod.yml`).
|
||||
Dragonfly is Redis-protocol compatible, so `packages/browser`'s session cache
|
||||
(Bun's native `RedisClient`) needs no code changes. The compose service is
|
||||
renamed `redis` → `dragonfly`; the `REDIS_URL` env var name is unchanged.
|
||||
- `BROWSER_RECYCLE_AFTER_CONTEXTS` no longer recycles preemptively after
|
||||
every N temporary contexts. The pool now recycles only when Tier 3 or
|
||||
Tier 4 returns a `blocked` / `needs-js` outcome, preserving cookies,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
dragonfly:
|
||||
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.39.0
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
- dragonfly_data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 10s
|
||||
@@ -16,10 +16,10 @@ services:
|
||||
ports:
|
||||
- "${PORT:-8191}:8191"
|
||||
environment:
|
||||
- REDIS_URL=redis://redis:6379
|
||||
- REDIS_URL=redis://dragonfly:6379
|
||||
- BROWSER_POOL_SIZE=${BROWSER_POOL_SIZE:-3}
|
||||
depends_on:
|
||||
redis:
|
||||
dragonfly:
|
||||
condition: service_healthy
|
||||
shm_size: 1gb
|
||||
dns:
|
||||
@@ -49,4 +49,4 @@ services:
|
||||
- "${PORT_DOCS:-3001}:80"
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
dragonfly_data:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
dragonfly:
|
||||
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.39.0
|
||||
restart: always
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
- dragonfly_data:/data
|
||||
|
||||
trawl:
|
||||
image: ghcr.io/germondai/trawl:latest
|
||||
@@ -13,10 +13,10 @@ services:
|
||||
shm_size: 1gb
|
||||
mem_limit: 3g
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379
|
||||
REDIS_URL: redis://dragonfly:6379
|
||||
BROWSER_POOL_SIZE: 5
|
||||
depends_on:
|
||||
- redis
|
||||
- dragonfly
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://localhost:8191/health"]
|
||||
interval: 30s
|
||||
@@ -25,4 +25,4 @@ services:
|
||||
start_period: 90s
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
dragonfly_data:
|
||||
|
||||
+6
-6
@@ -1,8 +1,8 @@
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
dragonfly:
|
||||
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.39.0
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
- dragonfly_data:/data
|
||||
|
||||
trawl:
|
||||
image: ghcr.io/germondai/trawl:latest
|
||||
@@ -10,10 +10,10 @@ services:
|
||||
- "${PORT:-8191}:8191"
|
||||
shm_size: 1gb
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379
|
||||
REDIS_URL: redis://dragonfly:6379
|
||||
BROWSER_POOL_SIZE: ${BROWSER_POOL_SIZE:-3}
|
||||
depends_on:
|
||||
- redis
|
||||
- dragonfly
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://localhost:8191/health"]
|
||||
interval: 30s
|
||||
@@ -22,4 +22,4 @@ services:
|
||||
start_period: 90s
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
dragonfly_data:
|
||||
|
||||
Reference in New Issue
Block a user