From dbb075e90f92c6ce1f304a2cdbae013d842bd62b Mon Sep 17 00:00:00 2001 From: "nadeko.net Selfhost" Date: Thu, 9 May 2024 18:45:04 -0400 Subject: [PATCH] Use Docker Valkey instead of passing a socket --- docker-compose.yml | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 449dcc6e..fa077f19 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,11 @@ # Docker compose file for inv.nadeko.net services: + valkey: + image: valkey/valkey:7.2-alpine + restart: unless-stopped + volumes: + - "./valkey:/data" invidious-refresher: image: git.nadeko.net/fijxu/invidious:latest @@ -9,29 +14,43 @@ services: - ./config/config-refresher.yml:/etc/invidious/config.yml:ro - ./logs:/var/log/invidious:rw - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw - - /var/run/valkey/valkey.sock:/var/run/redis/redis.sock:rw environment: INVIDIOUS_CONFIG_FILE: /etc/invidious/config.yml + depends_on: + - valkey + healthcheck: + test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 + interval: 30s + timeout: 5s + retries: 2 + invidious: image: git.nadeko.net/fijxu/invidious:latest restart: unless-stopped - deploy: + deploy: replicas: 8 volumes: - ./config/config.yml:/etc/invidious/config.yml:ro - ./logs:/var/log/invidious:rw - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw - - /var/run/valkey/valkey.sock:/var/run/redis/redis.sock:rw environment: INVIDIOUS_CONFIG_FILE: /etc/invidious/config.yml + depends_on: + - valkey + healthcheck: + test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 + interval: 30s + timeout: 5s + retries: 2 + invidious-nginx: - image: nginx:latest - restart: unless-stopped - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf:ro - depends_on: - - invidious - ports: - - "127.0.0.1:10011:3000" + image: nginx:latest + restart: unless-stopped + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - invidious + ports: + - "127.0.0.1:10011:3000"