basket-service/deploy/image-push.sh

18 lines
545 B
Bash
Executable File

#!/bin/sh
# RUN IN REPO ROOT DIR !!
export IMAGE_BASE="git.pbiernat.io/egommerce/basket"
export SERVER_IMAGE="$IMAGE_BASE-svc"
export WORKER_IMAGE="$IMAGE_BASE-worker"
TARGET=${1:-latest}
echo $DOCKER_PASSWORD | docker login git.pbiernat.io -u $DOCKER_USERNAME --password-stdin
docker push "$SERVER_IMAGE:$TARGET"
docker push "$WORKER_IMAGE:$TARGET"
# Restart container
curl -X POST http://127.0.0.1:9001/api/webhooks/70892c11-b14e-4fb5-b813-ed0daade00d8
curl -X POST http://127.0.0.1:9001/api/webhooks/309e753d-641d-48ea-9256-a267f4f8b5b4