Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions service/scripts/check_celery_beat.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if /usr/bin/docker exec `docker ps | grep 'deployment_scidash_1' | awk '{ print $1 }'` bash -c 'ps aux | grep "scidash.main beat"' | grep celery; then
exit 0
else
/usr/bin/docker exec -d `docker ps | grep 'deployment_scidash_1' | awk '{ print $1 }'` bash -c 'rm /app/scidash/celerybeat.pid; source /app/scidash/venv/bin/activate; make run-celery-beat'
fi
10 changes: 10 additions & 0 deletions service/scripts/install_scidash_scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

echo "!!! Run me with sudo !!!"
echo "Reminder, modify the scidash_start.sh and scidash_stop.sh scripts"
echo "to point to the right deployment folder and then run me again"
cp scidash_popd.sh /usr/local/bin/
cp scidash_start.sh /usr/local/bin/
cp scidash_stop.sh /usr/local/bin/
cp check_celery_beat.sh /usr/local/bin/
cp scidash_check_service.sh /usr/local/bin/
7 changes: 7 additions & 0 deletions service/scripts/scidash_check_service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -z `/usr/local/bin/docker-compose ps -q deployment_scidash_1` ] || [ -z `/usr/bin/docker ps -q --no-trunc | grep $(/usr/local/bin/docker-compose ps -q deployment_scidash_1)` ]; then
/usr/local/bin/scidash_start.sh
else
exit 0
fi
3 changes: 3 additions & 0 deletions service/scripts/scidash_popd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

pushd /home/metacell/deployment/scidash/service/deployment
5 changes: 5 additions & 0 deletions service/scripts/scidash_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

pushd /home/metacell/deployment/scidash/service/deployment
/usr/local/bin/docker-compose up -d
popd
5 changes: 5 additions & 0 deletions service/scripts/scidash_stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

pushd /home/metacell/deployment/scidash/service/deployment
/usr/local/bin/docker-compose stop
popd