Skip to content

Commit

Permalink
added check if docker daemon is running or not before starting the sc…
Browse files Browse the repository at this point in the history
…ripts for both gitpod and local scripts (#218)
  • Loading branch information
Palanikannan1437 authored Jun 21, 2024
1 parent d5a21ad commit 0c093a8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gitpod-scripts/startCloudDevBackend.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/sh

if ! docker info > /dev/null 2>&1; then
echo "Docker is not running, please start the Docker daemon and try again! 💪"
exit 1
fi

echo "--Starting Superprofile Backend--"

cd superprofile
sh initFaunaOnce.sh $1
cd ..
Expand Down
5 changes: 5 additions & 0 deletions gitpod-scripts/startCloudDevEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ check_and_set_next_port() {
fi
}

if ! docker info > /dev/null 2>&1; then
echo "Docker is not running, please start the Docker daemon and try again! 💪"
exit 1
fi

check_and_set_next_port

export NEXT_PUBLIC_PORT=$NEXTJS_PORT
Expand Down
5 changes: 5 additions & 0 deletions gitpod-scripts/startCloudDevStrapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ check_and_set_strapi_port() {
fi
}

if ! docker info > /dev/null 2>&1; then
echo "Docker is not running, please start the Docker daemon and try again! 💪"
exit 1
fi

check_and_set_strapi_port

printf '\nNEXT_PUBLIC_STRAPI_API_URL'="http://127.0.0.1:$STRAPI_PORT" >> app/.env
Expand Down
5 changes: 5 additions & 0 deletions startdevenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ check_and_set_next_port() {
fi
}

if ! docker info > /dev/null 2>&1; then
echo "Docker is not running, please start the Docker daemon and try again! 💪"
exit 1
fi

sh startBackend.sh $1

check_and_set_strapi_port
Expand Down

0 comments on commit 0c093a8

Please sign in to comment.