summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-07-20 09:52:25 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-07-20 09:52:25 -0400
commit74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e (patch)
tree7fde96c2a576f69c7d73972df11f68a469eff630 /Makefile
parenta1876cf6cc827743d8687a9113b727ef7190f452 (diff)
downloadchat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.tar.gz
chat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.tar.bz2
chat-74ff46bb987c0ed8594ace4b8d4bd15b14b1ef7e.zip
Changed Makefile to restart existing mysql/redis containers if they've been stopped
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 724497d91..589521c37 100644
--- a/Makefile
+++ b/Makefile
@@ -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