Parcourir la source

Merge pull request #527 from TheFrenchGhosty/better-compose

Enhance the compose file
Zed il y a 4 ans
Parent
commit
9ec9f130d1
2 fichiers modifiés avec 20 ajouts et 13 suppressions
  1. 19 12
      docker-compose.yml
  2. 1 1
      nitter.example.conf

+ 19 - 12
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
+      - ./nitter.conf:/src/nitter.conf:ro
+    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:
+  nitter-redis:

+ 1 - 1
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