Skip to content

Commit

Permalink
branch restart
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Bouhet committed Sep 26, 2024
1 parent 8ff9e69 commit 52f5b6e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/pasta/bin/project-branch-restart
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,22 @@ fi

# Go to branch directory
link=$(readlink "$branchDir")
cd $link
cd $link || exit 1

# Target main docker file
dockerFile="$originalComposeFileName"
if [ -f "$pastaComposeFileName" ]; then
dockerFile="$pastaComposeFileName"
fi

echo "> Docker file is $dockerFile"

echo "Stopping $link..."
docker compose -f $dockerFile down --volumes --remove-orphans > /dev/null 2>&1

echo "Starting $link with $dockerFile..."
echo "Starting $link..."
docker compose -f $dockerFile up -d > /dev/null 2>&1

cd -
cd - > /dev/null 2>&1
echo ""
echo "> Branch $branch of project $projectName restarted"

0 comments on commit 52f5b6e

Please sign in to comment.