Compare commits

9 Commits

5 changed files with 35 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.vscode

View File

@@ -1,6 +1,7 @@
FROM nginx:alpine FROM nginx:alpine
LABEL author="Piotr Biernat" LABEL author="Piotr Biernat"
LABEL service="api-gw"
LABEL vendor="Egommerce" LABEL vendor="Egommerce"
LABEL version="1.0" LABEL version="1.0"

15
Makefile Normal file
View File

@@ -0,0 +1,15 @@
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-dev:
- sh ${DEPLOY_DIR}/image-push.sh dev
push-image-prod:
- sh ${DEPLOY_DIR}/image-push.sh

View File

@@ -1,12 +1,12 @@
# apigw-service # api-gateway service
API Gateway - simple Nginx image with pre-configured reverse proxy's API Gateway - API Gateway service based on APISIX
Generowanie Klucza autoryzacji Generate random secret string
$ openssl rand -base64 24 $ openssl rand -base64 24
Budowanie obrazu: Building Docker(dev) image:
$ sh deploy/image-build.sh $ make build-image-dev
Opublikowanie obrazu: Publish Docker(dev) image:
$ sh deploy/image-push.sh $ make push-image-dev

View File

@@ -3,4 +3,14 @@
export IMAGE_NAME="git.pbiernat.dev/egommerce/apigw-svc" 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."