108 lines
3.7 KiB
YAML
108 lines
3.7 KiB
YAML
version: "3"
|
|
services:
|
|
|
|
invidious:
|
|
image: quay.io/invidious/invidious:latest
|
|
#image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
|
|
restart: unless-stopped
|
|
# Remove "127.0.0.1:" if used from an external IP
|
|
# ports:
|
|
# - "3010: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
|
|
invidious_companion:
|
|
# URL used for the internal communication between invidious and invidious companion
|
|
# There is no need to change that except if Invidious companion does not run on the same docker compose file.
|
|
- private_url: "http://companion:8282/companion"
|
|
# IT is NOT recommended to use the same key as HMAC KEY. Generate a new key!
|
|
# Use the key generated in the 2nd step
|
|
invidious_companion_key: "ohph3chaiw1kei4W"
|
|
# external_port:
|
|
# domain:
|
|
# https_only: false
|
|
# statistics_enabled: false
|
|
# Use the key generated in the 2nd step
|
|
hmac_key: "ohzuXohDag4iatoh"
|
|
healthcheck:
|
|
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/stats || exit 1
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 2
|
|
logging:
|
|
options:
|
|
max-size: "1G"
|
|
max-file: "4"
|
|
depends_on:
|
|
- invidious-db
|
|
networks:
|
|
- default
|
|
- proxy
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.invidious.rule=Host(`invidious.gandalf.dfas4.de`)"
|
|
- "traefik.http.routers.invidious.entrypoints=websecure"
|
|
- "traefik.http.routers.invidious.tls=true"
|
|
- "traefik.http.routers.invidious.tls.certresolver=myresolver"
|
|
- "traefik.http.services.invidious.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.invidious.tls.domains[0].main=gandalf.dfas4.de"
|
|
- "traefik.http.routers.invidious.tls.domains[0].sans=*.gandalf.dfas4.de"
|
|
companion:
|
|
image: quay.io/invidious/invidious-companion:latest
|
|
# Please read the following file for a comprehensive list of all available
|
|
# environment variables and their associated syntax:
|
|
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
|
|
environment:
|
|
# Use the key generated in the 2nd step
|
|
- SERVER_SECRET_KEY=ohph3chaiw1kei4W
|
|
restart: unless-stopped
|
|
# Uncomment only if you have configured "public_url" for Invidious companion
|
|
# Or if you want to use Invidious companion as an API in your program.
|
|
# Remove "127.0.0.1:" if used from an external IP
|
|
#ports:
|
|
# - "127.0.0.1:8282:8282"
|
|
logging:
|
|
options:
|
|
max-size: "1G"
|
|
max-file: "4"
|
|
cap_drop:
|
|
- ALL
|
|
read_only: true
|
|
# cache for youtube library
|
|
volumes:
|
|
- ./data/companioncache:/var/tmp/youtubei.js:rw
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
networks:
|
|
- default
|
|
invidious-db:
|
|
image: docker.io/library/postgres:14
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/postgresdata:/var/lib/postgresql/data
|
|
- ./data/config/sql:/config/sql
|
|
- ./data/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"]
|
|
networks:
|
|
- default
|
|
volumes:
|
|
postgresdata:
|
|
companioncache:
|
|
networks:
|
|
proxy:
|
|
name: proxy
|