diff --git a/demo/reset-to-block.sh b/demo/reset-to-block.sh index d2c1389..c44e02f 100755 --- a/demo/reset-to-block.sh +++ b/demo/reset-to-block.sh @@ -12,7 +12,10 @@ echo "Resetting block in redis" docker network create redis_net > /dev/null 2>&1 || true docker kill redis > /dev/null 2>&1 || true docker rm redis > /dev/null 2>&1 || true -docker run --rm --network redis_net -d --name redis -v "$PWD/validator$N/$TARGET_NETWORK/db:/data" redis:5.0.5-alpine > /dev/null 2>&1 || true +docker run --rm --network redis_net -d --name redis \ + -v "`pwd`/validator$N/$TARGET_NETWORK/db:/data" \ + -v "`dirname "$(pwd)"`/src/oracle/configs/redis.conf:/usr/local/etc/redis/redis.conf" \ + redis:5.0.5-alpine > /dev/null 2>&1 || true ../src/oracle/scripts/resetToBlock/run.sh redis_net $1 diff --git a/src/oracle/configs/redis.conf b/src/oracle/configs/redis.conf new file mode 100644 index 0000000..1a97ca9 --- /dev/null +++ b/src/oracle/configs/redis.conf @@ -0,0 +1 @@ +loglevel warning diff --git a/src/oracle/docker-compose-test.yml b/src/oracle/docker-compose-test.yml index 8d324b0..d709b79 100644 --- a/src/oracle/docker-compose-test.yml +++ b/src/oracle/docker-compose-test.yml @@ -62,6 +62,8 @@ services: image: redis:5.0.5-alpine volumes: - '${PWD}/${TARGET_NETWORK}/db:/data' + - './configs/redis.conf:/usr/local/etc/redis/redis.conf' + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] networks: - test_network rabbitmq: diff --git a/src/oracle/docker-compose.yml b/src/oracle/docker-compose.yml index c95f05b..b89d4c7 100644 --- a/src/oracle/docker-compose.yml +++ b/src/oracle/docker-compose.yml @@ -66,6 +66,8 @@ services: image: redis:5.0.5-alpine volumes: - '${PWD}/${TARGET_NETWORK}/db:/data' + - './configs/redis.conf:/usr/local/etc/redis/redis.conf' + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] networks: - redis-signer-net - redis-keygen-net diff --git a/src/oracle/shared/db.js b/src/oracle/shared/db.js index 514a486..a6732f7 100644 --- a/src/oracle/shared/db.js +++ b/src/oracle/shared/db.js @@ -14,8 +14,8 @@ redis.on('connect', () => { logger.info('Connected to redis') }) -redis.on('error', () => { - logger.warn('Redis error') +redis.on('error', e => { + logger.warn('Redis error %o', e) }) module.exports = redis