From 40d3699054f31e516e70c5d1937eb3c1b8679086 Mon Sep 17 00:00:00 2001 From: meliurwen Date: Sun, 2 Jan 2022 15:21:09 +0100 Subject: [PATCH] Added redis to nitter and updated its config --- config/nitter.conf | 9 +++++++-- docker-compose.yml | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/config/nitter.conf b/config/nitter.conf index d6543e4..8c12218 100644 --- a/config/nitter.conf +++ b/config/nitter.conf @@ -10,8 +10,9 @@ hostname = "nitter.net" [Cache] listMinutes = 240 # how long to cache list info (not the tweets, so keep it high) rssMinutes = 10 # how long to cache rss queries -redisHost = "localhost" +redisHost = "nitter-redis" redisPort = 6379 +redisPassword = "" redisConnections = 20 # connection pool size redisMaxConnections = 30 # max, new connections are opened when none are available, but if the pool size @@ -21,6 +22,9 @@ redisMaxConnections = 30 [Config] hmacKey = "secretkey" # random key for cryptographic signing of video urls base64Media = false # use base64 encoding for proxied media urls +enableRSS = true # set this to false to disable RSS feeds +proxy = "" # proxy type http/https +proxyAuth = "" tokenCount = 10 # minimum amount of usable tokens. tokens are used to authorize API requests, # but they expire after ~1 hour, and have a limit of 187 requests. @@ -33,7 +37,8 @@ tokenCount = 10 theme = "Nitter" replaceTwitter = "nitter.net" replaceYouTube = "invidio.us" -replaceInstagram = "" +replaceReddit = "teddit.net" +replaceInstagram = "bibliogram.art" proxyVideos = true hlsPlayback = false infiniteScroll = false diff --git a/docker-compose.yml b/docker-compose.yml index e4ac8c4..f78d0f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,6 +32,19 @@ services: networks: - socials + nitter-redis: + image: ${NIR_IMG:-redis:6-alpine} + container_name: ${NIR_CONTAINER_NAME:-nitter-redis} + restart: ${NIR_RESTART:-unless-stopped} + environment: + - REDIS_REPLICATION_MODE=master + expose: + - 6379 + volumes: + - nitter-redis:/var/lib/redis + networks: + - socials + nitter: build: context: nitter/ @@ -43,6 +56,8 @@ services: - ./config/nitter.conf:/src/nitter.conf networks: - socials + depends_on: + - nitter-redis omgur-redis: image: ${OMGR_IMG:-redis:6-alpine} @@ -50,6 +65,10 @@ services: restart: ${OMGR_RESTART:-unless-stopped} environment: - REDIS_REPLICATION_MODE=master + expose: + - 6379 + volumes: + - omgur-redis:/var/lib/redis networks: - socials @@ -115,6 +134,8 @@ services: volumes: nginx-cache: bibliogram-db: + nitter-redis: + omgur-redis: invidious-postgres-data: networks: