From 327025c838d043e6b2cb39e81f9a1f188a7813a3 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Sun, 23 Jan 2022 16:21:59 +0100 Subject: [PATCH 1/4] Enhance the compose file --- docker-compose.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0e66b3a..f651f3f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,25 @@ -version: "3.8" +version: "3" + services: - redis: - image: redis:6-alpine - restart: unless-stopped - volumes: - - redis-data:/var/lib/redis + nitter: image: zedeus/nitter:latest - restart: unless-stopped - depends_on: - - redis + container_name: nitter ports: - - "8080:8080" + - "127.0.0.1:8080:8080" # Replace with "8080:8080" if you don't use a reverse proxy volumes: - ./nitter.conf:/src/nitter.conf + depends_on: + - nitter-redis + restart: unless-stopped + + nitter-redis: + image: redis:6-alpine + container_name: nitter-redis + command: redis-server --save 60 1 --loglevel warning + volumes: + - nitter-redis:/data + restart: unless-stopped + volumes: redis-data: From 4761163c7ad0aac0a935a262d1cb9183f9698200 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Sun, 23 Jan 2022 16:24:40 +0100 Subject: [PATCH 2/4] Edit the example to reflect the changes --- nitter.example.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nitter.example.conf b/nitter.example.conf index 0ed6ed0..b987cd5 100644 --- a/nitter.example.conf +++ b/nitter.example.conf @@ -10,7 +10,7 @@ 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" # Change to "redis" if using docker-compose +redisHost = "localhost" # Change to "nitter-redis" if using docker-compose redisPort = 6379 redisPassword = "" redisConnections = 20 # connection pool size From 43af5658827836529d0ea830ef50647cb81ea854 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Sun, 23 Jan 2022 20:08:11 +0100 Subject: [PATCH 3/4] Actually name the volume correctly --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index f651f3f..235a7f8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,4 +22,4 @@ services: restart: unless-stopped volumes: - redis-data: + nitter-redis: From cb0de9856e75a328a2fe4ce0d0702ce5772538f5 Mon Sep 17 00:00:00 2001 From: TheFrenchGhosty Date: Sun, 23 Jan 2022 20:13:46 +0100 Subject: [PATCH 4/4] Make the configuration file read only --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 235a7f8..a98855f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: ports: - "127.0.0.1:8080:8080" # Replace with "8080:8080" if you don't use a reverse proxy volumes: - - ./nitter.conf:/src/nitter.conf + - ./nitter.conf:/src/nitter.conf:ro depends_on: - nitter-redis restart: unless-stopped