Skip to content

Commit

Permalink
Change usernames
Browse files Browse the repository at this point in the history
  • Loading branch information
stijndcl committed May 6, 2024
1 parent 7a18835 commit 964f36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions unipept-database/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions unipept-database/db_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 964f36c

Please sign in to comment.