Configure Juxtaposition with Redis

This commit is contained in:
Matthew Lopez
2024-04-28 13:27:04 -04:00
parent aea83de628
commit d35fa242e2
4 changed files with 20 additions and 0 deletions

View File

@@ -296,6 +296,7 @@ services:
depends_on:
- account
- mongodb
- redis
- friends
restart: unless-stopped
ports:

View File

@@ -46,5 +46,9 @@ module.exports = JSON.parse(
secret: process.env.JUXT_CONFIG_AWS_SPACES_SECRET,
},
},
redis: {
host: process.env.JUXT_CONFIG_REDIS_HOST,
port: process.env.JUXT_CONFIG_REDIS_PORT,
},
})
);

View File

@@ -11,3 +11,5 @@ JUXT_CONFIG_WHITELIST=1|http,mii.olv.pretendo.cc,,2|1|https,mii.olv.pretendo.cc,
JUXT_CONFIG_POST_LIMIT=20
JUXT_CONFIG_AWS_SPACES_ENDPOINT=http://minio.pretendo.cc
JUXT_CONFIG_AWS_SPACES_KEY=minio_pretendo
JUXT_CONFIG_REDIS_HOST=redis
JUXT_CONFIG_REDIS_PORT=6379

View File

@@ -0,0 +1,13 @@
diff --git i/src/redisCache.js w/src/redisCache.js
index b4f3b7a..cabe595 100644
--- i/src/redisCache.js
+++ w/src/redisCache.js
@@ -5,7 +5,7 @@ const logger = require('./logger');
const config = require('../config.json');
const { host, port } = config.redis;
-const redisClient = redis.createClient({ host, port });
+const redisClient = redis.createClient({ url: `redis://${host}:${port}` });
redisClient.on('error', (error) => {
logger.error(error);