From 6ac4813594c11066dcb76040b37f219864e4a47d Mon Sep 17 00:00:00 2001 From: Leon Klingele Date: Fri, 21 Feb 2020 02:15:24 +0100 Subject: [PATCH] docker,kubernetes: create PostgreSQL "privacy" type before using it Fixes the following error when setting up the database: postgres_1 | 2020-02-21 01:01:22.371 UTC [172] ERROR: type "privacy" does not exist at character 200 postgres_1 | 2020-02-21 01:01:22.371 UTC [172] STATEMENT: CREATE TABLE public.playlists postgres_1 | ( postgres_1 | title text, postgres_1 | id text primary key, postgres_1 | author text, postgres_1 | description text, postgres_1 | video_count integer, postgres_1 | created timestamptz, postgres_1 | updated timestamptz, postgres_1 | privacy privacy, postgres_1 | index int8[] postgres_1 | ); postgres_1 | ERROR: type "privacy" does not exist postgres_1 | LINE 10: privacy privacy, --- docker/entrypoint.postgres.sh | 2 +- kubernetes/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/entrypoint.postgres.sh b/docker/entrypoint.postgres.sh index f5fce309..1588c56c 100755 --- a/docker/entrypoint.postgres.sh +++ b/docker/entrypoint.postgres.sh @@ -19,9 +19,9 @@ if [ ! -f /var/lib/postgresql/data/setupFinished ]; then su postgres -c 'psql invidious kemal < config/sql/session_ids.sql' su postgres -c 'psql invidious kemal < config/sql/nonces.sql' su postgres -c 'psql invidious kemal < config/sql/annotations.sql' + su postgres -c 'psql invidious kemal < config/sql/privacy.sql' su postgres -c 'psql invidious kemal < config/sql/playlists.sql' su postgres -c 'psql invidious kemal < config/sql/playlist_videos.sql' - su postgres -c 'psql invidious kemal < config/sql/privacy.sql' touch /var/lib/postgresql/data/setupFinished echo "### invidious database setup finished" exit diff --git a/kubernetes/README.md b/kubernetes/README.md index 163e9cd7..1c62f469 100644 --- a/kubernetes/README.md +++ b/kubernetes/README.md @@ -17,9 +17,9 @@ $ kubectl create configmap invidious-postgresql-init \ --from-file=../config/sql/session_ids.sql \ --from-file=../config/sql/nonces.sql \ --from-file=../config/sql/annotations.sql \ + --from-file=../config/sql/privacy.sql \ --from-file=../config/sql/playlists.sql \ - --from-file=../config/sql/playlist_videos.sql \ - --from-file=../config/sql/privacy.sql + --from-file=../config/sql/playlist_videos.sql # Install Helm app to your Kubernetes cluster $ helm install invidious ./