DONE: use ip for frontend but point to domain for api
This commit is contained in:
@@ -64,10 +64,9 @@ jobs:
|
||||
IMAGE="git.koppkb.com/kopkb/qms-fe-admin"
|
||||
TAGS="-t ${IMAGE}:${{ gitea.sha }}"
|
||||
API_URL="${{ secrets.VITE_API_URL }}"
|
||||
CUSTOMER_URL="${{ secrets.VITE_CUSTOMER_APP_URL }}"
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. http://YOUR_SERVER_IP:8080)"
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -76,10 +75,10 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "Building and pushing admin: ${TAGS}"
|
||||
echo "VITE_API_URL=${API_URL}"
|
||||
docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
--build-arg VITE_API_URL="${API_URL}" \
|
||||
--build-arg VITE_CUSTOMER_APP_URL="${CUSTOMER_URL:-http://localhost:3000}" \
|
||||
--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 \
|
||||
@@ -110,7 +109,7 @@ jobs:
|
||||
API_URL="${{ secrets.VITE_API_URL }}"
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. http://YOUR_SERVER_IP:8080)"
|
||||
echo "ERROR: Set Gitea secret VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -155,7 +154,7 @@ jobs:
|
||||
fi
|
||||
|
||||
if [ -z "${API_URL}" ]; then
|
||||
echo "ERROR: Set Gitea secret NEXT_PUBLIC_API_URL or VITE_API_URL (e.g. http://YOUR_SERVER_IP:8080)"
|
||||
echo "ERROR: Set Gitea secret NEXT_PUBLIC_API_URL or VITE_API_URL (e.g. https://qms-api.erahn.com.my)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user