Skip to content
Open
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
3 changes: 2 additions & 1 deletion scripts/git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ do
echo Cloning the repository: $REPOSITORY
echo ========================================================
REPO_URL=https://github.com/devmentors/$REPOSITORY.git
cd ../../
git clone $REPO_URL
cd $REPOSITORY && cd ..
cd -
done
34 changes: 34 additions & 0 deletions scripts/git-pull-run-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
REPOSITORIES=(Pacco.APIGateway Pacco.APIGateway.Ocelot Pacco.Services.Availability Pacco.Services.Customers Pacco.Services.Deliveries Pacco.Services.Identity Pacco.Services.Operations Pacco.Services.Orders Pacco.Services.OrderMaker Pacco.Services.Parcels Pacco.Services.Pricing Pacco.Services.Vehicles)

for REPOSITORY in ${REPOSITORIES[*]}
do
echo ========================================================
echo Updating the repository: $REPOSITORY
echo ========================================================
cd ../../$REPOSITORY
git checkout develop && git pull && git checkout master && git pull
cd -
done

echo ========================================================
echo "stoping all containers..."
echo ========================================================

container_ids=($(docker ps -a -q))
echo container_ids
for container_id in ${container_ids[@]}
do
echo stopping container with Id: ${container_id}
eval docker stop ${container_id}
echo stopped
echo ========================================================
done

echo ========================================================
echo "building & starting all services..."
echo ========================================================
cd ../compose
eval "docker network create pacco-network || true"
eval "docker-compose -f services-local.yml up --build --remove-orphans"
echo "DONE"
4 changes: 3 additions & 1 deletion scripts/git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ do
echo ========================================================
echo Updating the repository: $REPOSITORY
echo ========================================================
cd $REPOSITORY && git checkout develop && git pull && git checkout master && git pull && cd ..
cd ../../$REPOSITORY
git checkout develop && git pull && git checkout master && git pull
cd -
done