Skip to content

Commit

Permalink
Don't destroy the network on dsh stop - network id changes and contai…
Browse files Browse the repository at this point in the history
…ners need re-associating.
  • Loading branch information
pingers committed Apr 5, 2018
1 parent 18e3440 commit e24160f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dsh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ dsh_stop() {

notice "Stopping containers."
docker-compose stop
}

# Command: ./dsh stop
# Stops project, then takes down containers and removes volumes if possible.
dsh_purge() {
dsh_stop
if docker network ls | grep "\s${PROJECT}_default" > /dev/null; then
notice "Disconnecting nginx proxy from network."
set +e
Expand All @@ -111,12 +117,6 @@ dsh_stop() {
docker network rm ${PROJECT}_default
set -e
fi
}

# Command: ./dsh stop
# Stops project, then takes down containers and removes volumes if possible.
dsh_purge() {
dsh_stop
notice "Taking down containers, removing volumes if possible."
set +e
docker-compose down -v
Expand Down

0 comments on commit e24160f

Please sign in to comment.