|
| 1 | +--- |
| 2 | +services: |
| 3 | + |
| 4 | + invidious: |
| 5 | + image: quay.io/invidious/invidious:2025.04.04-0c07e9d |
| 6 | + restart: unless-stopped |
| 7 | + ports: |
| 8 | + - "80:3000" |
| 9 | + environment: |
| 10 | + # Please read the following file for a comprehensive list of all available |
| 11 | + # configuration options and their associated syntax: |
| 12 | + # https://github.com/iv-org/invidious/blob/master/config/config.example.yml |
| 13 | + INVIDIOUS_CONFIG: | |
| 14 | + db: |
| 15 | + dbname: invidious |
| 16 | + user: {{ invidious.db_user }} |
| 17 | + password: {{ invidious.db_password }} |
| 18 | + host: invidious-db |
| 19 | + port: 5432 |
| 20 | + check_tables: true |
| 21 | + invidious_companion: |
| 22 | + - private_url: "http://companion:8282" |
| 23 | + public_url: "http://localhost:8282" |
| 24 | + invidious_companion_key: "{{ invidious.companion_key }}" |
| 25 | + # external_port: |
| 26 | + # domain: |
| 27 | + # https_only: false |
| 28 | + # statistics_enabled: false |
| 29 | + hmac_key: "{{ invidious.hmac_key }}" |
| 30 | + healthcheck: |
| 31 | + test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 |
| 32 | + interval: 30s |
| 33 | + timeout: 5s |
| 34 | + retries: 2 |
| 35 | + logging: |
| 36 | + options: |
| 37 | + max-size: "1G" |
| 38 | + max-file: "4" |
| 39 | + depends_on: |
| 40 | + - invidious-db |
| 41 | + |
| 42 | + companion: |
| 43 | + image: quay.io/invidious/invidious-companion:master-0eadc21 |
| 44 | + environment: |
| 45 | + # Use the key generated in the 2nd step |
| 46 | + - SERVER_SECRET_KEY={{ invidious.companion_key }} |
| 47 | + restart: unless-stopped |
| 48 | + # Remove "127.0.0.1:" if used from an external IP |
| 49 | + ports: |
| 50 | + - "127.0.0.1:8282:8282" |
| 51 | + logging: |
| 52 | + options: |
| 53 | + max-size: "1G" |
| 54 | + max-file: "4" |
| 55 | + cap_drop: |
| 56 | + - ALL |
| 57 | + read_only: true |
| 58 | + # cache for youtube library |
| 59 | + volumes: |
| 60 | + - companioncache:/var/tmp/youtubei.js:rw |
| 61 | + security_opt: |
| 62 | + - no-new-privileges:true |
| 63 | + |
| 64 | + invidious-db: |
| 65 | + image: postgres:14 |
| 66 | + restart: unless-stopped |
| 67 | + volumes: |
| 68 | + - postgresdata:/var/lib/postgresql/data |
| 69 | + - ./config/sql:/config/sql |
| 70 | + - ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh |
| 71 | + environment: |
| 72 | + POSTGRES_DB: invidious |
| 73 | + POSTGRES_USER: {{ invidious.db_user }} |
| 74 | + POSTGRES_PASSWORD: {{ invidious.db_password }} |
| 75 | + healthcheck: |
| 76 | + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] |
| 77 | + |
| 78 | +volumes: |
| 79 | + postgresdata: |
| 80 | + companioncache: |
0 commit comments