Added Invidious

master
Meliurwen 3 years ago
parent ae627b3691
commit 33d1e53416
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 1
      .gitignore
  2. 2
      build.sh
  3. 33
      config/invidious.yml
  4. 38
      docker-compose.yml
  5. 19
      invidious-postgres.env.example
  6. 38
      invidious.env.example
  7. 4
      nginx.env.example
  8. 25
      nginx/root/etc/nginx/conf.d/default.template

1
.gitignore vendored

@ -2,4 +2,5 @@
bibliogram/
nitter/
omgur/
invidious/
config/

@ -8,4 +8,6 @@ echo "Updating bibliogram..."
./build.updaterepo.sh https://git.sr.ht/~cadence/bibliogram bibliogram
echo "Updating omgur..."
./build.updaterepo.sh https://git.geraldwu.com/gerald/omgur.git omgur
echo "Updating invidious..."
./build.updaterepo.sh https://github.com/iv-org/invidious.git invidious
echo "Done."

@ -0,0 +1,33 @@
# See: https://github.com/iv-org/invidious/blob/master/config/config.example.yml
default_user_preferences:
#locale: en-US
#region: US
#captions: ["", "", ""]
dark_mode: true
thin_mode: false
feed_menu: ["Subscriptions", "Playlists"]
default_home:
max_results: 40
#annotations: false
#annotations_subscribed: false
comments: ["", ""]
player_style: invidious
related_videos: false
autoplay: false
continue: false
#continue_autoplay: true
listen: false
video_loop: false
quality: hd720
#quality_dash: auto
speed: 1.0
volume: 100
vr_mode: true
latest_only: false
notifications_only: false
unseen_only: false
sort: published
local: true
show_nick: true
automatic_instance_redirect: false

@ -25,7 +25,7 @@ services:
expose:
- "10407"
volumes:
- db:/app/db
- bibliogram-db:/app/db
- ./config/bibliogram.config.js:/app/config.js
networks:
- socials
@ -65,8 +65,42 @@ services:
depends_on:
- omgur-redis
invidious-postgres:
image: ${INVP_IMG:-postgres:10-alpine}
container_name: ${INVP_CONTAINER_NAME:-invidious-postgres}
restart: ${INVP_RESTART:-unless-stopped}
volumes:
db:
- invidious-postgres-data:/var/lib/postgresql/data
- ./invidious/config/sql:/config/sql:ro
- ./invidious/docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh:ro
env_file:
- invidious-postgres.env
expose:
- 5432
networks:
- socials
invidious:
build:
context: invidious/
dockerfile: docker/Dockerfile
container_name: ${INV_CONTAINER_NAME:-invidious}
restart: ${INV_RESTART:-unless-stopped}
env_file:
- invidious-postgres.env
- invidious.env
expose:
- 3000
volumes:
- ./config/invidious.yml:/config/config.yml
networks:
- socials
depends_on:
- invidious-postgres
volumes:
bibliogram-db:
invidious-postgres-data:
networks:
default:

@ -0,0 +1,19 @@
DB_USER=invidious
DB_PASSWORD=invidious
DB_HOST=invidious-postgres
DB_PORT=5432
DB_NAME=invidious
## Note: The 'database_url' setting allows the use of UNIX
## sockets. To do so, remove the IP address (or FQDN) and port
## and append the 'host' parameter. E.g:
## postgres://kemal:kemal@/invidious?host=/var/run/postgresql
##
## Accepted values: a postgres:// URI
## Default: postgres://kemal:kemal@localhost:5432/invidious
INVIDIOUS_DATABASE_URL=postgres://${DB_PASSWORD}:${DB_USER}@${DB_HOST}:${DB_PORT}/${DB_NAME}
POSTGRES_USER=${DB_USER}
POSTGRES_PASSWORD=${DB_PASSWORD}
POSTGRES_DB=${DB_NAME}

@ -0,0 +1,38 @@
# See:
# - https://github.com/iv-org/invidious/pull/1702
# - https://github.com/iv-org/invidious/blob/master/config/config.example.yml
INVIDIOUS_CONFIG_FILE="/config/config.yml"
INVIDIOUS_CHECK_TABLES=true
INVIDIOUS_PORT=3000
INVIDIOUS_EXTERNAL_PORT=443
INVIDIOUS_HOST_BINDING=0.0.0.0
INVIDIOUS_DOMAIN=domain.tld
INVIDIOUS_HTTPS_ONLY=true
INVIDIOUS_HSTS=true
INVIDIOUS_DISABLE_PROXY=false
INVIDIOUS_POOL_SIZE=100
#INVIDIOUS_USE_QUIC=false
#INVIDIOUS_COOKIES=
#INVIDIOUS_FORCE_RESOLVE=
#INVIDIOUS_OUTPUT=STDOUT
#INVIDIOUS_LOG_LEVEL=Info
#INVIDIOUS_POPULAR_ENABLED=false
#INVIDIOUS_STATISTICS_ENABLED=false
#INVIDIOUS_REGISTRATION_ENABLED=false
INVIDIOUS_LOGIN_ENABLED=true
INVIDIOUS_CAPTCHA_ENABLED=false
#INVIDIOUS_ADMINS=[""]
INVIDIOUS_CHANNEL_THREADS=1
#INVIDIOUS_FULL_REFRESH=false
INVIDIOUS_FEED_THREADS=1
#INVIDIOUS_DECRYPT_POLLING=true
#INVIDIOUS_CAPTCHA_API_URL=
#INVIDIOUS_CAPTCHA_KEY=
#INVIDIOUS_BANNER=
INVIDIOUS_USE_PUBSUB_FEEDS=true
#INVIDIOUS_HMAC_KEY=
#INVIDIOUS_DMCA_CONTENT=[""]
#INVIDIOUS_CACHE_ANNOTATIONS=false
#INVIDIOUS_MODIFIED_SOURCE_CODE_URL=

@ -14,6 +14,10 @@ OMG_HOSTNAME=
OMG_ADDR=omgur
OMG_PORT=8080
INV_HOSTNAME=
INV_ADDR=invidious
INV_PORT=3000
NGINX_LISTEN_PORT=80
# Reverse-proxy and certbot

@ -27,6 +27,13 @@ upstream omgur {
server ${OMG_ADDR}:${OMG_PORT};
}
upstream invidious {
# Cannot connect to network of this container
server 127.0.0.1 down;
## Can be connected with the network
server ${INV_ADDR}:${INV_PORT};
}
server {
# This is a catch-all hostname (it will never trigger on a real hostname).
# If an access by IP or by an unhandled domain linking to this IP is tried,
@ -105,3 +112,21 @@ server {
}
}
server {
listen ${NGINX_LISTEN_PORT};
server_name ${INV_HOSTNAME};
# Disable do not add the server version in the header
server_tokens off;
location / {
proxy_pass http://invidious;
}
location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}
}

Loading…
Cancel
Save