Mercurial > repos > gga > genenotebook_genenotebook_build
view launch_gnb.sh @ 6:12494257f0f0 draft
planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/genenotebook commit 5ad4d3b59c746740b22834fbef55e3e6170b52a8
author | gga |
---|---|
date | Fri, 17 Nov 2023 15:53:01 +0000 |
parents | 5a6050937cb9 |
children | dfb2bc3aedbd |
line wrap: on
line source
#!/bin/bash set -e mongod --dbpath ./mongo_db/ --unixSocketPrefix `pwd` --bind_ip fake_socket --logpath ./mongod.log --pidfilepath ./mongo.pid & sleep 8 # "Listening on" is for mongodb 5x if ! grep -q "Listening on" ./mongod.log; then echo "Failed to launch MongoDB:" 1>&2; cat ./mongod.log 1>&2; kill $GNB_PID; exit 1; fi; TMP_STORAGE=$(pwd)/tmp_storage mkdir "$TMP_STORAGE" export NODE_OPTIONS="--max-old-space-size=$((${GALAXY_MEMORY_MB:-8192} * 75 / 100))" genoboo run --storage-path "$TMP_STORAGE" --port ${GNB_PORT} --mongo-url mongodb://$MONGO_URI%2Fmongodb-27017.sock/genenotebook > ./gnb.log 2>&1 & export GNB_PID=$! sleep 15 if ! grep -q "GeneNoteBook server started, serving" ./gnb.log; then echo "Failed to launch GeneNoteBook:" 1>&2; cat ./gnb.log 1>&2; kill $GNB_PID $(<"./mongo.pid"); exit 1; fi;