This commit is contained in:
parent
af40a74b69
commit
108a55c471
@ -1,6 +1,7 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
LABEL author="Piotr Biernat"
|
||||
LABEL service="api-gw"
|
||||
LABEL vendor="Egommerce"
|
||||
LABEL version="1.0"
|
||||
|
||||
|
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
DEPLOY_DIR := ./deploy
|
||||
SRC_DIR := ./src
|
||||
|
||||
## DEPLOY PART
|
||||
build-image-dev:
|
||||
- sh ${DEPLOY_DIR}/image-build.sh dev
|
||||
|
||||
build-image-prod:
|
||||
- sh ${DEPLOY_DIR}/image-build.sh
|
||||
|
||||
push-image-prod:
|
||||
- sh ${DEPLOY_DIR}/image-push.sh
|
@ -3,4 +3,14 @@
|
||||
|
||||
export IMAGE_NAME="git.pbiernat.dev/egommerce/apigw-svc"
|
||||
|
||||
docker build --rm --cache-from "$IMAGE_NAME:latest" -t "$IMAGE_NAME:latest" .
|
||||
TARGET=${1:-latest}
|
||||
|
||||
echo "Building: $IMAGE_NAME:$TARGET"
|
||||
if [ $TARGET = "dev" ]
|
||||
then
|
||||
docker build --rm --no-cache -t "$IMAGE_NAME:dev" . >/dev/null 2>&1
|
||||
else
|
||||
docker build --rm --cache-from "$IMAGE_NAME:$TARGET" -t "$IMAGE_NAME:$TARGET" . >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo "Done."
|
||||
|
Loading…
Reference in New Issue
Block a user