Skip to content

Commit

Permalink
pulled make file commands into separate executable shell files for mo…
Browse files Browse the repository at this point in the history
…re logic handling of git tags
  • Loading branch information
aouyang1 committed Dec 30, 2019
1 parent 49cd367 commit 441dcd5
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ docker-dev:
docker-prod: docker-prod-mpserver docker-prod-mpfrontend

docker-prod-mpserver:
docker build --no-cache -t aouyang1/mpserver:$(TRAVIS_TAG) -f mpserver/Dockerfile_prod mpserver/
./docker-prod-mpserver.sh

docker-prod-mpfrontend:
docker build --no-cache -t aouyang1/mpfrontend:$(TRAVIS_TAG) -f mpfrontend/Dockerfile_prod mpfrontend/
./docker-prod-mpfrontend.sh

deploy: undeploy
docker-compose up -d
Expand All @@ -39,7 +39,7 @@ undeploy:
push: push-mpserver push-mpfrontend

push-mpserver:
docker push aouyang1/mpserver:$(TRAVIS_TAG)
./push-mpserver.sh

push-mpfrontend:
docker push aouyang1/mpfrontend:$(TRAVIS_TAG)
./push-mpfrontend.sh
7 changes: 7 additions & 0 deletions docker-prod-mpfrontend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

TAG=latest
if [ "${TRAVIS_TAG}" != "" ]; then
TAG=${TRAVIS_TAG}
fi
docker build --no-cache -t aouyang1/mpfrontend:${TAG} -f mpserver/Dockerfile_prod mpfrontend/
7 changes: 7 additions & 0 deletions docker-prod-mpserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

TAG=latest
if [ "${TRAVIS_TAG}" != "" ]; then
TAG=${TRAVIS_TAG}
fi
docker build --no-cache -t aouyang1/mpserver:${TAG} -f mpserver/Dockerfile_prod mpserver/
7 changes: 7 additions & 0 deletions push-mpfrontend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

TAG=latest
if [ "${TRAVIS_TAG}" != "" ]; then
TAG=${TRAVIS_TAG}
fi
docker push aouyang1/mpfrontend:${TAG}
7 changes: 7 additions & 0 deletions push-mpserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

TAG=latest
if [ "${TRAVIS_TAG}" != "" ]; then
TAG=${TRAVIS_TAG}
fi
docker push aouyang1/mpserver:${TAG}

0 comments on commit 441dcd5

Please sign in to comment.