diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2015-07-20 09:52:25 -0400 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2015-07-20 09:52:25 -0400 |
commit | 74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e (patch) | |
tree | 7fde96c2a576f69c7d73972df11f68a469eff630 | |
parent | a1876cf6cc827743d8687a9113b727ef7190f452 (diff) | |
download | chat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.tar.gz chat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.tar.bz2 chat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.zip |
Changed Makefile to restart existing mysql/redis containers if they've been stopped
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -41,17 +41,23 @@ build: install: @go get $(GOFLAGS) github.com/tools/godep - @if [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \ + @if [ $(shell docker ps -a | grep -ci mattermost-mysql) -eq 0 ]; then \ echo restoring go libs using godep; \ $(GOPATH)/bin/godep restore; \ echo starting mattermost-mysql; \ docker run --name mattermost-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mostest \ -e MYSQL_USER=mmuser -e MYSQL_PASSWORD=mostest -e MYSQL_DATABASE=mattermost_test -d mysql > /dev/null; \ + elif [ $(shell docker ps | grep -ci mattermost-mysql) -eq 0 ]; then \ + echo restarting mattermost-mysql; \ + docker start mattermost-mysql > /dev/null; \ fi - @if [ $(shell docker ps | grep -ci mattermost-redis) -eq 0 ]; then \ + @if [ $(shell docker ps -a | grep -ci mattermost-redis) -eq 0 ]; then \ echo starting mattermost-redis; \ docker run --name mattermost-redis -p 6379:6379 -d redis > /dev/null; \ + elif [ $(shell docker ps | grep -ci mattermost-redis) -eq 0 ]; then \ + echo restarting mattermost-redis; \ + docker start mattermost-redis > /dev/null; \ fi @cd web/react/ && npm install |