From 964f36c6e3446ff638aa976795630604090143b4 Mon Sep 17 00:00:00 2001 From: stijndcl Date: Mon, 6 May 2024 16:40:05 +0200 Subject: [PATCH] Change usernames --- unipept-database/Dockerfile | 5 ++--- unipept-database/db_entrypoint.sh | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/unipept-database/Dockerfile b/unipept-database/Dockerfile index 517b67b..0b79e73 100755 --- a/unipept-database/Dockerfile +++ b/unipept-database/Dockerfile @@ -49,9 +49,8 @@ RUN apt update && \ sudo \ lz4 - -# Configure curl to use the newly builded libcurl -#RUN ldconfig +RUN useradd unipept +USER unipept RUN git clone --depth 1 -b feature/postgres https://github.com/stijndcl/unipept-database COPY "db_entrypoint.sh" "/docker-entrypoint-initdb.d/db_entrypoint.sh" diff --git a/unipept-database/db_entrypoint.sh b/unipept-database/db_entrypoint.sh index 2dc960b..9fda1e7 100755 --- a/unipept-database/db_entrypoint.sh +++ b/unipept-database/db_entrypoint.sh @@ -17,17 +17,17 @@ else VERBOSE="" fi -echo "unipept" | su -c "./scripts/build_database.sh $VERBOSE-f $FILTER_TAXA -i '/index' -d '/tmp' -m $SORT_MEMORY database $DB_TYPES $DB_SOURCES '/tmp/tables'" root +echo "unipept" | su -c "./scripts/build_database.sh $VERBOSE-f $FILTER_TAXA -i '/index' -d '/tmp' -m $SORT_MEMORY database $DB_TYPES $DB_SOURCES '/tmp/tables'" unipept echo "***** START LOADING TABLES *****" # Data has been generated by this point. Now, we can load it into the PSQL-database for use later on. PGPASSWORD=unipept psql -U unipept < schemas/structure_no_index_no_constraints.sql -echo "unipept" | su -c "./scripts/parallel_load.sh '/tmp/tables'" root +echo "unipept" | su -c "./scripts/parallel_load.sh '/tmp/tables'" unipept rm -f '/tables/**/*.tsv.lz4' echo "***** START APPLYING CONSTRAINTS *****" PGPASSWORD=unipept psql -U unipept < schemas/structure_constraints_only.sql echo "***** START INDEXING TABLES *****" -echo "unipept" | su -c "./scripts/parallel_index.sh" root +echo "unipept" | su -c "./scripts/parallel_index.sh" unipept