diff --git a/Makefile b/Makefile index 60742bf..8cb86e6 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/docker-prod-mpfrontend.sh b/docker-prod-mpfrontend.sh new file mode 100755 index 0000000..03af520 --- /dev/null +++ b/docker-prod-mpfrontend.sh @@ -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/ diff --git a/docker-prod-mpserver.sh b/docker-prod-mpserver.sh new file mode 100755 index 0000000..867a067 --- /dev/null +++ b/docker-prod-mpserver.sh @@ -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/ diff --git a/push-mpfrontend.sh b/push-mpfrontend.sh new file mode 100755 index 0000000..0ac70a7 --- /dev/null +++ b/push-mpfrontend.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +TAG=latest +if [ "${TRAVIS_TAG}" != "" ]; then + TAG=${TRAVIS_TAG} +fi +docker push aouyang1/mpfrontend:${TAG} diff --git a/push-mpserver.sh b/push-mpserver.sh new file mode 100755 index 0000000..7c08c21 --- /dev/null +++ b/push-mpserver.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +TAG=latest +if [ "${TRAVIS_TAG}" != "" ]; then + TAG=${TRAVIS_TAG} +fi +docker push aouyang1/mpserver:${TAG}