Remove step about permissions + simplify docker-compose file

This commit is contained in:
Émilien (perso) 2024-12-27 11:17:44 +00:00 committed by GitHub
parent e4b7a0cf48
commit 8ab43741b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,10 +42,10 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
cd invidious cd invidious
``` ```
2. Assign the correct permissions to Invidious companion for the cache directory: 2. Generate two secret keys, one for Invidious (HMAC_KEY) and one for Invidious companion (invidious_companion_key)
```bash ```bash
mkdir -p /var/tmp/youtubei.js pwgen 16 1 # for Invidious (HMAC_KEY)
chown 10001:10001 -R /var/tmp/youtubei.js pwgen 16 1 # for Invidious companion (invidious_companion_key)
``` ```
3. Edit the docker-compose.yml with this content: 3. Edit the docker-compose.yml with this content:
@ -81,11 +81,13 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
# Please consult for more doc: https://github.com/unixfox/invidious/blob/invidious-companion/config/config.example.yml#L57-L88 # Please consult for more doc: https://github.com/unixfox/invidious/blob/invidious-companion/config/config.example.yml#L57-L88
public_url: "http://localhost:8282/" public_url: "http://localhost:8282/"
# IT is NOT recommended to use the same key as HMAC KEY. Generate a new key! # 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: "CHANGE_ME!!" invidious_companion_key: "CHANGE_ME!!"
# external_port: # external_port:
# domain: # domain:
# https_only: false # https_only: false
# statistics_enabled: false # statistics_enabled: false
# Use the key generated in the 2nd step
hmac_key: "CHANGE_ME!!" hmac_key: "CHANGE_ME!!"
healthcheck: healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1 test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/trending || exit 1
@ -102,6 +104,7 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
companion: companion:
image: quay.io/invidious/invidious-companion:latest image: quay.io/invidious/invidious-companion:latest
environment: environment:
# Use the key generated in the 2nd step
- SERVER_SECRET_KEY=CHANGE_ME!!SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG - SERVER_SECRET_KEY=CHANGE_ME!!SAME_AS_INVIDIOUS_COMPANION_SECRET_KEY_FROM_INVIDIOUS_CONFIG
# SET this value IF you are using a reverse proxy OR accessing invidious from an external IP. # SET this value IF you are using a reverse proxy OR accessing invidious from an external IP.
# Please consult for more doc: https://github.com/iv-org/invidious-companion/wiki/Environment-variables # Please consult for more doc: https://github.com/iv-org/invidious-companion/wiki/Environment-variables
@ -117,10 +120,9 @@ Make sure to run the newer Docker Compose V2: https://docs.docker.com/compose/in
cap_drop: cap_drop:
- ALL - ALL
read_only: true read_only: true
user: 10001:10001
# cache for youtube library # cache for youtube library
volumes: volumes:
- /var/tmp/youtubei.js:/var/tmp/youtubei.js:rw - companioncache:/var/tmp/youtubei.js:rw
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true