DONE: update to use ip for the api in frontend
This commit is contained in:
@@ -56,7 +56,7 @@ jobs:
|
||||
IMAGE_TAG="${{ inputs.image_tag }}"
|
||||
|
||||
mkdir -p "${DEPLOY_DIR}"
|
||||
cp be/docker-compose.yml "${DEPLOY_DIR}/docker-compose.yml"
|
||||
cp be/prod-compose.yml "${DEPLOY_DIR}/docker-compose.yml"
|
||||
|
||||
cd "${DEPLOY_DIR}"
|
||||
|
||||
|
||||
@@ -64,9 +64,14 @@ jobs:
|
||||
IMAGE="git.koppkb.com/kopkb/qms-fe-admin"
|
||||
TAGS="-t ${IMAGE}:${{ gitea.sha }}"
|
||||
API_URL="${{ secrets.VITE_API_URL }}"
|
||||
# Branch QR display URL only (public domain via nginx)
|
||||
BRANCH_QR_BASE_URL="${{ secrets.VITE_BRANCH_QR_BASE_URL }}"
|
||||
if [ -z "${BRANCH_QR_BASE_URL}" ]; then
|
||||
BRANCH_QR_BASE_URL="https://qms-customer.erahn.com.my"
|
||||
fi
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. http://172.16.6.200:8080)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -76,9 +81,11 @@ jobs:
|
||||
|
||||
echo "Building and pushing admin: ${TAGS}"
|
||||
echo "VITE_API_URL=${API_URL}"
|
||||
echo "VITE_BRANCH_QR_BASE_URL=${BRANCH_QR_BASE_URL}"
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--build-arg VITE_API_URL="${API_URL}" \
|
||||
--build-arg VITE_BRANCH_QR_BASE_URL="${BRANCH_QR_BASE_URL}" \
|
||||
--cache-from type=registry,ref=${IMAGE}:buildcache,ignore-error=true \
|
||||
--cache-to type=registry,ref=${IMAGE}:buildcache,mode=max \
|
||||
-f fe/web/admin-app/Dockerfile \
|
||||
@@ -109,7 +116,7 @@ jobs:
|
||||
API_URL="${{ secrets.VITE_API_URL }}"
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. http://172.16.6.200:8080)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -154,7 +161,7 @@ jobs:
|
||||
fi
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret NEXT_PUBLIC_API_URL or VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
echo "ERROR: Set Gitea secret NEXT_PUBLIC_API_URL or VITE_API_URL (e.g. http://172.16.6.200:8080)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user