Skip to content

Commit

Permalink
Simplify using docker-compose commands. (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
pingers authored Nov 27, 2018
1 parent 2743df3 commit 4bbcdad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dsh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Connecting via ./dsh shell and running robo build is a common next step."
# Command: ./dsh shell
# Connects a shell to the web image as the current user.
dsh_shell() {
if ! docker ps | grep "\s${PROJECT}_web_1" > /dev/null; then
if docker-compose -f ${DOCKER_COMPOSE_FILE} ps --filter "status=stopped" --services | grep web > /dev/null; then
notice "Project not running, starting."
dsh_start
fi
Expand All @@ -83,9 +83,7 @@ dsh_purge() {
# Command: ./dsh status
# Shows status information about project containers.
dsh_status() {
if ! docker ps | grep "\s${PROJECT}_"; then
notice "${PROJECT} not running."
fi
docker-compose -f ${DOCKER_COMPOSE_FILE} ps
}

# Command: ./dsh logs
Expand Down

0 comments on commit 4bbcdad

Please sign in to comment.