Skip to content

Commit

Permalink
tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
devosc committed Oct 23, 2018
1 parent e2d56ec commit 5daf05a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bin/docker-down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ if [ -f $file ]; then
if [ "$images" != "" ]; then
rmi="--rmi local"
else
echo -e "No project images"
echo "No project images"
fi
fi

# stop project
docker-compose --file $file down --remove-orphans $rmi;

else
echo -e "Project not found"
echo "Project not found"
fi

# stop all containers

if [ "-a" = "$1" ] || [ "-a" = "$2" ]; then
containers=$(docker ps -aq)
if [ "$containers" != "" ]; then
echo -e "Removing containers"
echo "Removing containers"
docker stop $containers
docker rm $containers
else
echo -e "No containers"
echo "No containers"
fi
fi
2 changes: 1 addition & 1 deletion bin/docker-services
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ else
if [ "$images" != "" ]; then
rmi="--rmi local"
else
echo -e "No images"
echo "No images"
fi
shift
fi
Expand Down
6 changes: 3 additions & 3 deletions bin/docker-up
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ source docker-build-env

# start services
if [ "-a" = "$1" ] || [ "-a" = "$2" ]; then
echo -e "Starting services"
echo "Starting services"
docker-services up
fi

file="$(pwd)/docker-compose.yml"

if [ -f $file ]; then
echo -e "Starting project"
echo "Starting project"

# build images before starting containers
build=""
Expand All @@ -21,5 +21,5 @@ if [ -f $file ]; then

docker-compose --file $file up -d $build
else
echo -e "Project not found"
echo "Project not found"
fi

0 comments on commit 5daf05a

Please sign in to comment.