Initial commit

This commit is contained in:
Minecon724 2025-03-29 15:51:31 +01:00
commit e7a5c42951
Signed by: Minecon724
GPG key ID: A02E6E67AB961189
7 changed files with 182 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "invidious"]
path = invidious
url = https://github.com/iv-org/invidious

43
config-refresh.yaml Normal file
View file

@ -0,0 +1,43 @@
db:
user: kemal
password: kemal
host: invidious-db
port: 5432
dbname: invidious
dmca_content: []
check_tables: true
hmac_key: REPLACE ME
external_port: 443
domain: id.example.com
https_only: true
statistics_enabled: true
use_pubsub_feeds: true
use_innertube_for_captions: true
invidious_companion_key: REPLACE ME
invidious_companion:
- private_url: "https://1.c.id.example.com"
public_url: "https://1.c.id.example.com"
- private_url: "https://2.c.id.example.com"
public_url: "https://2.c.id.example.com"
# ...and so on
default_user_preferences:
player_style: youtube
quality: dash
autoplay: true
save_player_pos: true
local: true
#http_proxy:
# user: ''
# password: ''
# host: 192.0.2.39
# port: 8080
banner: '<small style="opacity: 0.5;"><a href="/about">Instance info here. Please read.</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/about/problems.html">Having problems? Here are some solutions.</a></small>'

43
config.yaml Normal file
View file

@ -0,0 +1,43 @@
db:
user: kemal
password: kemal
host: invidious-db
port: 5432
dbname: invidious
dmca_content: []
check_tables: true
hmac_key: REPLACE ME
external_port: 443
domain: id.example.com
https_only: true
statistics_enabled: true
use_pubsub_feeds: true
use_innertube_for_captions: true
invidious_companion_key: REPLACE ME
invidious_companion:
- private_url: "https://1.c.id.example.com"
public_url: "https://1.c.id.example.com"
- private_url: "https://2.c.id.example.com"
public_url: "https://2.c.id.example.com"
# ...and so on
default_user_preferences:
player_style: youtube
quality: dash
autoplay: true
save_player_pos: true
local: true
#http_proxy:
# user: ''
# password: ''
# host: 192.0.2.39
# port: 8080
banner: '<small style="opacity: 0.5;"><a href="/about">Instance info here. Please read.</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/about/problems.html">Having problems? Here are some solutions.</a></small>'

68
docker-compose.yml Normal file
View file

@ -0,0 +1,68 @@
services:
invidious-refresh:
image: quay.io/invidious/invidious:master
restart: unless-stopped
volumes:
- /opt/invidious/config-refresh.yaml:/config/config.yaml:ro
environment:
- INVIDIOUS_CONFIG_FILE=/config/config.yaml
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
depends_on:
- invidious-db
invidious:
image: quay.io/invidious/invidious:master
restart: unless-stopped
volumes:
- /opt/invidious/config.yaml:/config/config.yaml:ro
environment:
- INVIDIOUS_CONFIG_FILE=/config/config.yaml
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
interval: 30s
timeout: 5s
retries: 2
deploy:
replicas: 6
depends_on:
- invidious-db
invidious-db:
image: docker.io/library/postgres:14
restart: unless-stopped
volumes:
- postgresdata:/var/lib/postgresql/data
- /opt/invidious/invidious/config/sql:/config/sql
- /opt/invidious/invidious/docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
environment:
POSTGRES_DB: invidious
POSTGRES_USER: kemal
POSTGRES_PASSWORD: kemal
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
nginx:
image: nginx:alpine-slim
restart: unless-stopped
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- invidious
ports:
- "192.168.81.2:3000:3000"
volumes:
postgresdata:
companioncache:
#networks:
# default:
# enable_ipv6: true
# ipam:
# config:
# - subnet: 2001:0DB9::/112
# gateway: 2001:0DB9::1

1
invidious Submodule

@ -0,0 +1 @@
Subproject commit 23ff6135bb4304c6b5e9de6fc06e67bfadc9651a

18
nginx.conf Normal file
View file

@ -0,0 +1,18 @@
user nginx;
events {
worker_connections 1000;
}
http {
server {
listen 3000;
listen [::]:3000;
access_log off;
location / {
resolver 127.0.0.11;
set $backend "invidious";
proxy_pass http://$backend:3000;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
}
}
}

6
reset.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/bash
cd /opt/invidious
echo "Restarting..."
docker compose restart invidious-refresh
docker compose restart invidious