deploy: hr-portal

This commit is contained in:
TenX PM
2026-05-04 20:37:44 +00:00
parent 87e9346d62
commit 443c4a2f00
35 changed files with 9795 additions and 13 deletions
+10 -2
View File
@@ -123,13 +123,12 @@ else: print('')
APP_RESPONSE=$(curl -sk -X POST -H "Authorization: Bearer ${COOLIFY_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${COOLIFY_API}/applications" \
"${COOLIFY_API}/applications/public" \
-d "{
\"project_uuid\": \"${PROJECT_UUID}\",
\"environment_name\": \"production\",
\"server_uuid\": \"${SERVER_UUID}\",
\"destination_uuid\": \"${DESTINATION_UUID}\",
\"type\": \"public\",
\"name\": \"${PROJECT_NAME}\",
\"git_repository\": \"${REPO_FULL_URL}\",
\"git_branch\": \"main\",
@@ -140,6 +139,15 @@ APP_RESPONSE=$(curl -sk -X POST -H "Authorization: Bearer ${COOLIFY_ACCESS_TOKEN
APP_UUID=$(echo "${APP_RESPONSE}" | python3 -c "import sys,json; print(json.load(sys.stdin).get('uuid',''))" 2>/dev/null)
if [ -n "${APP_UUID}" ]; then
# Coolify strips the full URL — patch it back
curl -sk -X PATCH -H "Authorization: Bearer ${COOLIFY_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
"${COOLIFY_API}/applications/${APP_UUID}" \
-d "{\"git_repository\": \"${REPO_FULL_URL}\"}" > /dev/null
echo "[deploy] Patched git_repository to full URL"
fi
if [ -z "${APP_UUID}" ]; then
echo "[deploy] App creation response: ${APP_RESPONSE}"
# Try to find existing app