diff --git a/self_host/invidious/docker-compose.yml b/self_host/invidious/docker-compose.yml new file mode 100644 index 00000000..d8a8ed5c --- /dev/null +++ b/self_host/invidious/docker-compose.yml @@ -0,0 +1,69 @@ +services: + + invidious: + image: quay.io/invidious/invidious:latest + # image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices + restart: unless-stopped + ports: + - "3000:3000" + environment: + # Please read the following file for a comprehensive list of all available + # configuration options and their associated syntax: + # https://github.com/iv-org/invidious/blob/master/config/config.example.yml + INVIDIOUS_CONFIG: | + db: + dbname: invidious + user: kemal + password: kemal + host: invidious-db + port: 5432 + check_tables: true + signature_server: inv_sig_helper:12999 + visitor_data: "CHANGE ME!!!" + po_token: "CHANGE ME!!!" + # external_port: + # domain: + # https_only: false + # statistics_enabled: false + hmac_key: "CHANGE ME!!!" + healthcheck: + test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 + interval: 30s + timeout: 5s + retries: 2 + logging: + options: + max-size: "1G" + max-file: "4" + depends_on: + - invidious-db + + inv_sig_helper: + image: quay.io/invidious/inv-sig-helper:latest + init: true + command: ["--tcp", "0.0.0.0:12999"] + environment: + - RUST_LOG=info + restart: unless-stopped + cap_drop: + - ALL + read_only: true + security_opt: + - no-new-privileges:true + + invidious-db: + image: docker.io/library/postgres:14 + restart: unless-stopped + volumes: + - postgresdata:/var/lib/postgresql/data + - ./config/sql:/config/sql + - ./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"] + +volumes: + postgresdata: diff --git a/self_host/invidious/gen_new_tokens.sh b/self_host/invidious/gen_new_tokens.sh new file mode 100755 index 00000000..b6c5e2b8 --- /dev/null +++ b/self_host/invidious/gen_new_tokens.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# NOTE: It is recommended you change these once in a while in the docker-compose.yml +# NOTE: You can also generate a new hmac_key using pwgen +# `pwgen 20 1` and pasting that in the hmac_key section of the docker-compose.yml file. + +echo "GENERATING NEW visitor_data AND po_token" +docker run quay.io/invidious/youtube-trusted-session-generator diff --git a/self_host/redlib/docker-compose.yml b/self_host/redlib/docker-compose.yml new file mode 100644 index 00000000..4260d656 --- /dev/null +++ b/self_host/redlib/docker-compose.yml @@ -0,0 +1,24 @@ +services: + redlib: + image: quay.io/redlib/redlib:latest + restart: always + container_name: "redlib" + ports: + - 8080:8080 # Specify `127.0.0.1:8080:8080` instead if using a reverse proxy + user: nobody + read_only: true + security_opt: + - no-new-privileges:true + # - seccomp=seccomp-redlib.json + cap_drop: + - ALL + env_file: .env + networks: + - redlib + healthcheck: + test: ["CMD", "wget", "--spider", "-q", "--tries=1", "http://localhost:8080/settings"] + interval: 5m + timeout: 3s + +networks: + redlib: diff --git a/self_host/redlib/env.sample b/self_host/redlib/env.sample new file mode 100644 index 00000000..fd22d976 --- /dev/null +++ b/self_host/redlib/env.sample @@ -0,0 +1,52 @@ +# Redlib configuration +# See the Configuration section of the README for a more detailed explanation of these settings. + +# Instance-specific settings +# Enable SFW-only mode for the instance +REDLIB_SFW_ONLY=off +# Set a banner message for the instance +#REDLIB_BANNER= +# Disable search engine indexing +REDLIB_ROBOTS_DISABLE_INDEXING=off +# Set the Pushshift frontend for "removed" links +REDLIB_PUSHSHIFT_FRONTEND=undelete.pullpush.io + +# Default user settings +# Set the default theme (options: system, light, dark, black, dracula, nord, laserwave, violet, gold, rosebox, gruvboxdark, gruvboxlight) +REDLIB_DEFAULT_THEME=system +# Set the default front page (options: default, popular, all) +REDLIB_DEFAULT_FRONT_PAGE=default +# Set the default layout (options: card, clean, compact) +REDLIB_DEFAULT_LAYOUT=card +# Enable wide mode by default +REDLIB_DEFAULT_WIDE=off +# Set the default post sort method (options: hot, new, top, rising, controversial) +REDLIB_DEFAULT_POST_SORT=hot +# Set the default comment sort method (options: confidence, top, new, controversial, old) +REDLIB_DEFAULT_COMMENT_SORT=confidence +# Enable blurring Spoiler content by default +REDLIB_DEFAULT_BLUR_SPOILER=off +# Enable showing NSFW content by default +REDLIB_DEFAULT_SHOW_NSFW=off +# Enable blurring NSFW content by default +REDLIB_DEFAULT_BLUR_NSFW=off +# Enable HLS video format by default +REDLIB_DEFAULT_USE_HLS=off +# Hide HLS notification by default +REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION=off +# Disable autoplay videos by default +REDLIB_DEFAULT_AUTOPLAY_VIDEOS=off +# Define a default list of subreddit subscriptions (format: sub1+sub2+sub3) +#REDLIB_DEFAULT_SUBSCRIPTIONS= +# Define a default list of subreddit filters (format: sub1+sub2+sub3) +#REDLIB_DEFAULT_FILTERS= +# Hide awards by default +REDLIB_DEFAULT_HIDE_AWARDS=off +# Hide sidebar and summary +REDLIB_DEFAULT_HIDE_SIDEBAR_AND_SUMMARY=off +# Disable the confirmation before visiting Reddit +REDLIB_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION=off +# Hide score by default +REDLIB_DEFAULT_HIDE_SCORE=off +# Enable fixed navbar by default +REDLIB_DEFAULT_FIXED_NAVBAR=on