diff --git a/docker-compose.yaml b/docker-compose.yaml index 65cdc7f0..917805a0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -53,17 +53,19 @@ services: - SANDBOX_PROTOCOL=${SANDBOX_PROTOCOL:-} - START_WRITERS=${START_WRITERS:-} - CONTRACT_ID=${CONTRACT_ID:-} - - CHAIN_CACHE_TYPE=${CHAIN_CACHE_TYPE:-} + - CHAIN_CACHE_TYPE=${CHAIN_CACHE_TYPE:-redis} - REDIS_CACHE_URL=${REDIS_CACHE_URL:-redis://redis:6379} depends_on: - redis redis: image: redis:latest + # TODO: append only is reccomended to prevent losing data + # command: redis-server --appendonly yes ports: - "6379:6379" volumes: - - ${REDIS_DATA_PATH:-./data/redis}:/app/data/redis + - ${REDIS_DATA_PATH:-./data/redis}:/data observer: image: ghcr.io/ar-io/ar-io-observer:${OBSERVER_IMAGE_TAG:-a5b9b3a0246ba2912c610ad28ffe849d8184d752} diff --git a/src/config.ts b/src/config.ts index 8970703e..3188ae46 100644 --- a/src/config.ts +++ b/src/config.ts @@ -79,7 +79,7 @@ export const CONTRACT_ID = env.varOrDefault( 'CONTRACT_ID', 'bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U', ); -export const CHAIN_CACHE_TYPE = env.varOrDefault('CHAIN_CACHE_TYPE', 'redis'); +export const CHAIN_CACHE_TYPE = env.varOrDefault('CHAIN_CACHE_TYPE', 'fs'); export const REDIS_CACHE_URL = env.varOrDefault( 'REDIS_CACHE_URL', 'redis://localhost:6379',