Skip to content

Commit

Permalink
chore: 🤖 check compose stack running and handle
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Nov 21, 2023
1 parent fade8a2 commit c0bb0ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ if ! git pull origin main; then
exit 1
fi

if ! docker compose ps --format "{{.Service}} {{.State}}" | grep 'llm_indexer running' || ! docker compose ps --format "{{.Service}} {{.State}}" | grep 'discordjs-bot'; then
echo "⚠️ Warning: Docker compose stack is down"
echo "🤖 Should start compose stack, be patient..."

if ! docker compose up; then
echo "👹 Oops! Failed to start compose stack"

exit 1
fi
fi


if ! docker compose restart; then
echo "👹 Oops! Failed to restart docker compose"

exit 1
fi

0 comments on commit c0bb0ff

Please sign in to comment.