update invidious
This commit is contained in:
parent
7c2fd948dc
commit
09f2347f82
2 changed files with 112 additions and 30 deletions
|
@ -6,7 +6,7 @@ include:
|
||||||
#- ../invidious-companion/docker-compose.yml
|
#- ../invidious-companion/docker-compose.yml
|
||||||
|
|
||||||
# https://docs.docker.com/reference/compose-file/extension/
|
# https://docs.docker.com/reference/compose-file/extension/
|
||||||
x-common-env: &common-env
|
x-common-invidious-env: &common-invidious-env
|
||||||
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
||||||
INVIDIOUS_REDIS_URL: "tcp://valkey:6379"
|
INVIDIOUS_REDIS_URL: "tcp://valkey:6379"
|
||||||
# TODO: Support I2P
|
# TODO: Support I2P
|
||||||
|
@ -17,17 +17,17 @@ x-common-env: &common-env
|
||||||
x-common-dep: &common-dep
|
x-common-dep: &common-dep
|
||||||
depends_on: ["pgbouncer"]
|
depends_on: ["pgbouncer"]
|
||||||
|
|
||||||
x-common: &common
|
x-common: &common-invidious
|
||||||
#hostname: invidious
|
#hostname: invidious
|
||||||
env_file:
|
env_file:
|
||||||
# Env file containing INVIDIOUS_* variables
|
# Env file containing INVIDIOUS_* variables
|
||||||
- .env
|
- .env
|
||||||
image: "git.nadeko.net/fijxu/invidious:latest"
|
image: "git.nadeko.net/fijxu/invidious:latest"
|
||||||
restart: unless-stopped
|
restart: always
|
||||||
mem_limit: 512MB
|
mem_limit: 780MB
|
||||||
cpus: 0.35
|
cpus: 0.50
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 2
|
replicas: 1
|
||||||
volumes:
|
volumes:
|
||||||
# Volume is not needed anymore since I use pgbouncer now
|
# Volume is not needed anymore since I use pgbouncer now
|
||||||
# - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
# - /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
||||||
|
@ -44,59 +44,116 @@ x-common-haproxy: &common-haproxy
|
||||||
volumes:
|
volumes:
|
||||||
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
||||||
|
|
||||||
|
x-common-anubis-env: &common-anubis-env
|
||||||
|
DIFFICULTY: "2"
|
||||||
|
SERVE_ROBOTS_TXT: "true"
|
||||||
|
BIND: "0.0.0.0:4000"
|
||||||
|
METRICS_BIND: "0.0.0.0:9090"
|
||||||
|
POLICY_FNAME: "/data/cfg/botPolicy.json"
|
||||||
|
|
||||||
|
x-common-anubis: &common-anubis
|
||||||
|
image: git.nadeko.net/fijxu/anubis:latest
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- "./botPolicy.json:/data/cfg/botPolicy.json:ro"
|
||||||
|
labels:
|
||||||
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# INVIDIOUS SECTION #
|
# INVIDIOUS SECTION #
|
||||||
invidious:
|
invidious:
|
||||||
<<: *common
|
<<: *common-invidious
|
||||||
environment:
|
environment:
|
||||||
<<: *common-env
|
<<: *common-invidious-env
|
||||||
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-cl2-c.nadeko.net:8443", "public_url": "https://inv-cl2-c.nadeko.net:8443"}]'
|
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-cl2-c.nadeko.net:8443", "public_url": "https://inv-cl2-c.nadeko.net:8443"}]'
|
||||||
INVIDIOUS_EXTERNAL_VIDEOPLAYBACK_PROXY: '["https://inv-cl2.nadeko.net:8443"]'
|
|
||||||
networks: ["invidious"]
|
networks: ["invidious"]
|
||||||
#depends_on: ["valkey", "haproxy"]
|
|
||||||
depends_on: ["valkey"]
|
depends_on: ["valkey"]
|
||||||
|
|
||||||
invidious2:
|
invidious2:
|
||||||
<<: *common
|
<<: *common-invidious
|
||||||
environment:
|
environment:
|
||||||
<<: *common-env
|
<<: *common-invidious-env
|
||||||
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-ca1-c.nadeko.net", "public_url": "https://inv-ca1-c.nadeko.net"}]'
|
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-ca1-c.nadeko.net", "public_url": "https://inv-ca1-c.nadeko.net"}]'
|
||||||
INVIDIOUS_EXTERNAL_VIDEOPLAYBACK_PROXY: '["https://inv-ca1.nadeko.net"]'
|
|
||||||
networks: ["invidious2"]
|
networks: ["invidious2"]
|
||||||
#depends_on: ["valkey2", "haproxy"]
|
|
||||||
depends_on: ["valkey2"]
|
depends_on: ["valkey2"]
|
||||||
|
|
||||||
invidious3:
|
invidious3:
|
||||||
<<: *common
|
<<: *common-invidious
|
||||||
environment:
|
environment:
|
||||||
<<: *common-env
|
<<: *common-invidious-env
|
||||||
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-us2-c.nadeko.net", "public_url": "https://inv-us2-c.nadeko.net"}]'
|
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-us2-c.nadeko.net", "public_url": "https://inv-us2-c.nadeko.net"}]'
|
||||||
INVIDIOUS_EXTERNAL_VIDEOPLAYBACK_PROXY: '["https://inv-us2.nadeko.net"]'
|
|
||||||
networks: ["invidious3"]
|
networks: ["invidious3"]
|
||||||
#depends_on: ["valkey3", "haproxy"]
|
|
||||||
depends_on: ["valkey3"]
|
depends_on: ["valkey3"]
|
||||||
|
|
||||||
invidious4:
|
invidious4:
|
||||||
<<: *common
|
<<: *common-invidious
|
||||||
environment:
|
environment:
|
||||||
<<: *common-env
|
<<: *common-invidious-env
|
||||||
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-eu1-c.nadeko.net", "public_url": "https://inv-eu1-c.nadeko.net"}]'
|
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-eu3-c.nadeko.net", "public_url": "https://inv-eu3-c.nadeko.net"}]'
|
||||||
INVIDIOUS_EXTERNAL_VIDEOPLAYBACK_PROXY: '["https://inv-eu1.nadeko.net"]'
|
|
||||||
networks: ["invidious4"]
|
networks: ["invidious4"]
|
||||||
#depends_on: ["valkey4", "haproxy"]
|
|
||||||
depends_on: ["valkey4"]
|
depends_on: ["valkey4"]
|
||||||
|
|
||||||
invidious5:
|
invidious5:
|
||||||
<<: *common
|
<<: *common-invidious
|
||||||
environment:
|
environment:
|
||||||
<<: *common-env
|
<<: *common-invidious-env
|
||||||
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-eu2-c.nadeko.net", "public_url": "https://inv-eu2-c.nadeko.net"}]'
|
INVIDIOUS_INVIDIOUS_COMPANION: '[{"private_url": "https://inv-eu2-c.nadeko.net", "public_url": "https://inv-eu2-c.nadeko.net"}]'
|
||||||
INVIDIOUS_EXTERNAL_VIDEOPLAYBACK_PROXY: '["https://inv-eu2.nadeko.net"]'
|
|
||||||
networks: ["invidious5"]
|
networks: ["invidious5"]
|
||||||
#depends_on: ["valkey5", "haproxy"]
|
|
||||||
depends_on: ["valkey5"]
|
depends_on: ["valkey5"]
|
||||||
|
|
||||||
|
# ANUBIS SECTION #
|
||||||
|
|
||||||
|
anubis-inv:
|
||||||
|
<<: *common-anubis
|
||||||
|
environment:
|
||||||
|
<<: *common-anubis-env
|
||||||
|
TARGET: "http://invidious:3000"
|
||||||
|
COOKIE: "anubis.inv1"
|
||||||
|
networks: ["invidious"]
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9051:9090
|
||||||
|
|
||||||
|
anubis-inv2:
|
||||||
|
<<: *common-anubis
|
||||||
|
environment:
|
||||||
|
<<: *common-anubis-env
|
||||||
|
TARGET: "http://invidious2:3000"
|
||||||
|
COOKIE: "anubis.inv2"
|
||||||
|
networks: ["invidious2"]
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9052:9090
|
||||||
|
|
||||||
|
anubis-inv3:
|
||||||
|
<<: *common-anubis
|
||||||
|
environment:
|
||||||
|
<<: *common-anubis-env
|
||||||
|
TARGET: "http://invidious3:3000"
|
||||||
|
COOKIE: "anubis.inv3"
|
||||||
|
networks: ["invidious3"]
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9053:9090
|
||||||
|
|
||||||
|
anubis-inv4:
|
||||||
|
<<: *common-anubis
|
||||||
|
environment:
|
||||||
|
<<: *common-anubis-env
|
||||||
|
TARGET: "http://invidious4:3000"
|
||||||
|
COOKIE: "anubis.inv4"
|
||||||
|
networks: ["invidious4"]
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9054:9090
|
||||||
|
|
||||||
|
anubis-inv5:
|
||||||
|
<<: *common-anubis
|
||||||
|
environment:
|
||||||
|
<<: *common-anubis-env
|
||||||
|
TARGET: "http://invidious5:3000"
|
||||||
|
COOKIE: "anubis.inv5"
|
||||||
|
networks: ["invidious5"]
|
||||||
|
ports:
|
||||||
|
- 127.0.0.1:9055:9090
|
||||||
|
|
||||||
# HAPROXY SECTION #
|
# HAPROXY SECTION #
|
||||||
haproxy:
|
haproxy:
|
||||||
<<: *common-haproxy
|
<<: *common-haproxy
|
||||||
|
|
|
@ -24,13 +24,13 @@ defaults
|
||||||
# Use another server if one takes too long to reply
|
# Use another server if one takes too long to reply
|
||||||
retries 4
|
retries 4
|
||||||
option redispatch
|
option redispatch
|
||||||
timeout client 30s
|
timeout client 10s
|
||||||
|
timeout connect 5s
|
||||||
# The default timeout of http request on invidious is 10 seconds.
|
# The default timeout of http request on invidious is 10 seconds.
|
||||||
# If this is less than 10 seconds, the reverse proxy may return
|
# If this is less than 10 seconds, the reverse proxy may return
|
||||||
# "503 service unavailable", not letting invidious respond to
|
# "503 service unavailable", not letting invidious respond to
|
||||||
# the client.
|
# the client.
|
||||||
timeout connect 11s
|
timeout server 30s
|
||||||
timeout server 10s
|
|
||||||
timeout queue 20s
|
timeout queue 20s
|
||||||
# https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#4.2-http-reuse
|
# https://www.haproxy.com/documentation/haproxy-configuration-manual/latest/#4.2-http-reuse
|
||||||
http-reuse safe
|
http-reuse safe
|
||||||
|
@ -44,24 +44,49 @@ frontend prometheus
|
||||||
|
|
||||||
frontend invidious
|
frontend invidious
|
||||||
bind *:8001
|
bind *:8001
|
||||||
|
use_backend anubis-inv if { path /watch } || { path_beg /.within.website }
|
||||||
default_backend invidious
|
default_backend invidious
|
||||||
|
|
||||||
frontend invidious2
|
frontend invidious2
|
||||||
bind *:8002
|
bind *:8002
|
||||||
|
use_backend anubis-inv2 if { path /watch } || { path_beg /.within.website }
|
||||||
default_backend invidious2
|
default_backend invidious2
|
||||||
|
|
||||||
frontend invidious3
|
frontend invidious3
|
||||||
bind *:8003
|
bind *:8003
|
||||||
|
use_backend anubis-inv3 if { path /watch } || { path_beg /.within.website }
|
||||||
default_backend invidious3
|
default_backend invidious3
|
||||||
|
|
||||||
frontend invidious4
|
frontend invidious4
|
||||||
bind *:8004
|
bind *:8004
|
||||||
|
use_backend anubis-inv4 if { path /watch } || { path_beg /.within.website }
|
||||||
default_backend invidious4
|
default_backend invidious4
|
||||||
|
|
||||||
frontend invidious5
|
frontend invidious5
|
||||||
bind *:8005
|
bind *:8005
|
||||||
|
use_backend anubis-inv5 if { path /watch } || { path_beg /.within.website }
|
||||||
default_backend invidious5
|
default_backend invidious5
|
||||||
|
|
||||||
|
backend anubis-inv
|
||||||
|
server srv1 anubis-inv:4000 check resolvers docker init-addr libc,none
|
||||||
|
server srv2 invidious:3000 check backup resolvers docker init-addr libc,none
|
||||||
|
|
||||||
|
backend anubis-inv2
|
||||||
|
server srv1 anubis-inv2:4000 check resolvers docker init-addr libc,none
|
||||||
|
server srv2 invidious2:3000 check backup resolvers docker init-addr libc,none
|
||||||
|
|
||||||
|
backend anubis-inv3
|
||||||
|
server srv1 anubis-inv3:4000 check resolvers docker init-addr libc,none
|
||||||
|
server srv2 invidious3:3000 check backup resolvers docker init-addr libc,none
|
||||||
|
|
||||||
|
backend anubis-inv4
|
||||||
|
server srv1 anubis-inv4:4000 check resolvers docker init-addr libc,none
|
||||||
|
server srv2 invidious4:3000 check backup resolvers docker init-addr libc,none
|
||||||
|
|
||||||
|
backend anubis-inv5
|
||||||
|
server srv1 anubis-inv5:4000 check resolvers docker init-addr libc,none
|
||||||
|
server srv2 invidious5:3000 check backup resolvers docker init-addr libc,none
|
||||||
|
|
||||||
backend invidious
|
backend invidious
|
||||||
server-template srv 2 invidious:3000 check resolvers docker init-addr libc,none
|
server-template srv 2 invidious:3000 check resolvers docker init-addr libc,none
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue