Files
invidious/docker-compose.yml

99 lines
3.2 KiB
YAML

# Warning: This docker-compose file is made for development purposes.
# Using it will build an image from the locally cloned repository.
#
# If you want to use Invidious in production, see the docker-compose.yml file provided
# in the installation documentation: https://docs.invidious.io/installation/
version: "3"
services:
invidious:
build:
context: .
dockerfile: docker/Dockerfile
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
depends_on:
invidious-db:
condition: service_healthy
restart: true
companion:
condition: service_started
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
domain: localhost
external_port: 3000
https_only: false
hmac_key: "localhost-test-hmac-key-change-me-in-production"
invidious_companion:
- private_url: "http://companion:8282/companion"
invidious_companion_key: "localhosttest123"
popular_enabled: false
top_enabled: false
feed_menu: []
default_home: Search
auth_type: ["invidious"]
# Below multiple authentication types can be defined
# The oidc authentication requires additional oidc configuration per oidc provider. OIDC provider names are specified in the configuration subtree
# Issuer url is the base url (without the .well-known/openid-configuration).
# OIDC handler expects your provider to have a redirect url in the format of {invidious_domain}/login/oidc/{oidc_name}/callback
# auth_type: ["invidious", "oidc"]
# auth_enforce_source: true
# OIDC configuration
# oidc:
# my-oidc:
# issuer: "ISSUER_URL!!"
# client_id: "CLIENT_ID!!"
# client_secret: "CLIENT_SECRET!!"
# field: "email"
# scopes: ["openid", "email", "profile"]
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/stats || exit 1
interval: 30s
timeout: 5s
retries: 2
companion:
image: quay.io/invidious/invidious-companion:latest
restart: unless-stopped
environment:
- SERVER_SECRET_KEY=localhosttest123
cap_drop:
- ALL
read_only: true
security_opt:
- no-new-privileges:true
volumes:
- companioncache:/var/tmp/youtubei.js:rw
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:
companioncache: