Skip to content

Commit

Permalink
changed execution order in startup and added test for data persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
jyotipm29 committed Nov 11, 2024
1 parent 4739bb8 commit 97c3de6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,28 @@ docker_exec install-tools "$SAMPLE_TOOLS"
# Test the Conda installation
docker_exec_run bash -c 'export PATH=$GALAXY_CONFIG_TOOL_DEPENDENCY_DIR/_conda/bin/:$PATH && conda --version && conda install samtools -c bioconda --yes'
# Test if data persistence works
docker stop galaxy
docker rm -f galaxy
cd "$WORKING_DIR"
docker run -d -p 8080:80 \
--name galaxy \
--privileged=true \
-v "$(pwd)/local_folder:/export/" \
-e GALAXY_CONFIG_ALLOW_USER_DATASET_PURGE=True \
-e GALAXY_CONFIG_ALLOW_PATH_PASTE=True \
-e GALAXY_CONFIG_ALLOW_USER_DELETION=True \
-e GALAXY_CONFIG_ENABLE_BETA_WORKFLOW_MODULES=True \
-v /tmp/:/tmp/ \
quay.io/bgruening/galaxy
echo 'Waiting for Galaxy to come up.'
galaxy-wait -g $BIOBLEND_GALAXY_URL --timeout 600
# Test if the tool installed previously is available
curl -v --fail 'http://localhost:8080/api/tools/toolshed.g2.bx.psu.edu/repos/devteam/cut_columns/Cut1/1.0.2'
# analyze image using dive tool
CI=true dive quay.io/bgruening/galaxy
Expand Down
24 changes: 12 additions & 12 deletions galaxy/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,6 @@ function start_supervisor {
fi
fi

wait_for_postgres

# Make sure the database is automatically updated
if [[ ! -z $GALAXY_AUTO_UPDATE_DB ]]
then
echo "Updating Galaxy database"
sh manage_db.sh -c $GALAXY_CONFIG_FILE upgrade
fi

if [[ ! -z $SUPERVISOR_MANAGE_CRON ]]; then
if [[ $NONUSE != *"cron"* ]]
then
Expand Down Expand Up @@ -496,16 +487,16 @@ if $PRIVILEGED; then
if [[ -z $DOCKER_PARENT ]]; then
#build the docker in docker environment
bash /root/cgroupfs_mount.sh
start_gravity
start_supervisor
start_gravity
supervisorctl start docker
wait_for_docker
else
#inheriting /var/run/docker.sock from parent, assume that you need to
#run docker with sudo to validate
echo "$GALAXY_USER ALL = NOPASSWD : ALL" >> /etc/sudoers
start_gravity
start_supervisor
start_gravity
fi
if [[ ! -z $PULL_IT_IMAGES ]]; then
echo "About to pull IT images. Depending on the size, this may take a while!"
Expand All @@ -523,8 +514,17 @@ if $PRIVILEGED; then
else
echo "Disable Galaxy Interactive Tools. Start with --privileged to enable ITs."
export GALAXY_CONFIG_INTERACTIVETOOLS_ENABLE=False
start_gravity
start_supervisor
start_gravity
fi

wait_for_postgres

# Make sure the database is automatically updated
if [[ ! -z $GALAXY_AUTO_UPDATE_DB ]]
then
echo "Updating Galaxy database"
sh manage_db.sh -c $GALAXY_CONFIG_FILE upgrade
fi

# In case the user wants the default admin to be created, do so.
Expand Down

0 comments on commit 97c3de6

Please sign in to comment.