From 829806a9b55e65460ab65a44d35987ffd2497bda Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 14 May 2025 19:46:32 +0200 Subject: [PATCH] Fix example `.env` & postgres vars for v5 --- .env.example | 45 ++++++------------------------------------ docker-compose.dev.yml | 5 ++++- 2 files changed, 10 insertions(+), 40 deletions(-) diff --git a/.env.example b/.env.example index 58af29c1..35808457 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ # vi: ft=sh # shellcheck disable=SC2034 +# THIS IS V5 .ENV ; IF YOU ARE ON V4 PLEASE LOOK AT THE .ENV HERE: https://github.com/zoriya/Kyoo/blob/v4.7.1/.env.example # Useful config options @@ -9,24 +10,9 @@ LIBRARY_ROOT=./video # You should set this to a path where kyoo can write large amount of data, this is used as a cache by the transcoder. # It will automatically be cleaned up on kyoo's startup/shutdown/runtime. CACHE_ROOT=/tmp/kyoo_cache -LIBRARY_LANGUAGES=en -# If this is true, kyoo will prefer to download the media in the original language of the item. -MEDIA_PREFER_ORIGINAL_LANGUAGE=false # A pattern (regex) to ignore files. LIBRARY_IGNORE_PATTERN=".*/[dD]ownloads?/.*" -# If this is true, new accounts wont have any permissions before you approve them in your admin dashboard. -REQUIRE_ACCOUNT_VERIFICATION=true -# Specify permissions of guest accounts, default is no permissions. -UNLOGGED_PERMISSIONS= -# but you can allow anyone to use your instance without account by doing: -# UNLOGGED_PERMISSIONS=overall.read,overall.play -# You can specify this to allow guests users to see your collection without behing able to play videos for example: -# UNLOGGED_PERMISSIONS=overall.read - -# Specify permissions of new accounts. -DEFAULT_PERMISSIONS=overall.read,overall.play - # Hardware transcoding (equivalent of --profile docker compose option). COMPOSE_PROFILES=cpu # cpu (no hardware acceleration) or vaapi or qsv or nvidia # the preset used during transcode. faster means worst quality, you can probably use a slower preset with hwaccels @@ -34,11 +20,6 @@ COMPOSE_PROFILES=cpu # cpu (no hardware acceleration) or vaapi or qsv or nvidia GOCODER_PRESET=fast -# The following value should be set to a random sequence of characters. -# You MUST change it when installing kyoo (for security) -# You can input multiple api keys separated by a , -KYOO_APIKEYS=t7H5!@4iMNsAaSJQ49pat4jprJgTcF656if#J3 - # Keep those empty to use kyoo's default api key. You can also specify a custom API key if you want. # go to https://www.themoviedb.org/settings/api and copy the api key (not the read access token, the api key) THEMOVIEDB_APIKEY= @@ -77,25 +58,11 @@ OIDC_SERVICE_AUTHMETHOD=ClientSecretBasic KYOO_URL= # Database things -POSTGRES_USER=KyooUser -POSTGRES_PASSWORD=KyooPassword -POSTGRES_DB=kyooDB -POSTGRES_SERVER=postgres -POSTGRES_PORT=5432 - -# Read by the api container to know if it should run meilisearch's migrations/sync -# and download missing images. This is a good idea to only have one instance with this on -# Note: it does not run postgres migrations, use the migration container for that. -RUN_MIGRATIONS=true - -MEILI_HOST="http://meilisearch:7700" -MEILI_MASTER_KEY="ghvjkgisbgkbgskegblfqbgjkebbhgwkjfb" - -RABBITMQ_HOST=rabbitmq -RABBITMQ_PORT=5672 -RABBITMQ_DEFAULT_USER=kyoo -RABBITMQ_DEFAULT_PASS=aohohunuhouhuhhoahothonseuhaoensuthoaentsuhha - +PGUSER=kyoo +PGPASSWORD=password +PGDATABASE=kyoo +PGHOST=postgres +PGPORT=5432 # v5 stuff, does absolutely nothing on master (aka: you can delete this) EXTRA_CLAIMS='{"permissions": ["core.read"], "verified": false}' diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 60e6606d..d0a15ee7 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -179,10 +179,13 @@ services: ports: - "5432:5432" environment: + - POSTGRES_USER=$PGUSER + - POSTGRES_PASSWORD=$PGPASSWORD + - POSTGRES_DB=$PGDATABASE - POSTGRES_HOST_AUTH_METHOD=trust command: ["postgres", "-c", "log_statement=all"] healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] + test: ["CMD-SHELL", "pg_isready -U ${PGUSER} -d ${PGDATABASE}"] interval: 5s timeout: 5s retries: 5