Files
Kifi/kifi-app/build_n_push.sh

30 lines
858 B
Bash
Executable File

#!/bin/bash
# Configuration
REGISTRY="hub.technobeesolutions.in"
USERNAME="technobee_admin"
PASSWORD='M@tr!x#149@dm!N'
IMAGE_NAME="kifi-app"
TAG="latest"
TAG_ONE="kifi-v2"
FULL_IMAGE_NAME="$REGISTRY/$IMAGE_NAME:$TAG"
FULL_IMAGE_NAME_ONE="$REGISTRY/$IMAGE_NAME:$TAG_ONE"
BASE_HREF="/kifi/"
API_URL="https://app.technobeesolutions.in/api/kifi-v2"
# Stop on any error
set -e
echo "Logging into Docker registry: $REGISTRY..."
echo "$PASSWORD" | docker login "$REGISTRY" -u "$USERNAME" --password-stdin
echo "Building and pushing Docker image for linux/amd64: $FULL_IMAGE_NAME and $FULL_IMAGE_NAME_ONE..."
docker buildx build --no-cache --platform linux/amd64 \
--build-arg BASE_HREF="$BASE_HREF" \
--build-arg API_BASE_URL="$API_URL" \
-t "$FULL_IMAGE_NAME" \
-t "$FULL_IMAGE_NAME_ONE" \
--push .
echo "Done! Image built and pushed successfully."