Add stack Update, ComfyUI model manager, and slim ComfyUI stack.
Server UI gains Update on stack cards, ComfyUI Models tab with workflow scan and downloads, and centralized comfyui_config. Model catalog and download scripts move from stacks/comfyui to server-ui so ComfyUI stays a minimal Docker wrapper for easier image updates.
This commit is contained in:
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify API_KEY from /opt/control-plane/.env against live server-ui.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# shellcheck source=print-api-key-instructions.sh
|
||||
source "${SCRIPT_DIR}/print-api-key-instructions.sh"
|
||||
|
||||
PROD_ENV="/opt/control-plane/.env"
|
||||
UI_PORT=8091
|
||||
|
||||
if [[ -f "${PROD_ENV}" ]]; then
|
||||
UI_PORT="$(grep '^SERVER_UI_PORT=' "${PROD_ENV}" 2>/dev/null | cut -d= -f2- || true)"
|
||||
if [[ -z "${UI_PORT}" ]]; then
|
||||
UI_PORT="$(sudo grep '^SERVER_UI_PORT=' "${PROD_ENV}" 2>/dev/null | cut -d= -f2- || true)"
|
||||
fi
|
||||
fi
|
||||
[[ -n "${UI_PORT}" ]] || UI_PORT=8091
|
||||
|
||||
api_key="$(_read_api_key "${PROD_ENV}")"
|
||||
|
||||
if [[ -z "${api_key}" && -r "${SCRIPT_DIR}/../../control-plane/.env" ]]; then
|
||||
api_key="$(_read_api_key "${SCRIPT_DIR}/../../control-plane/.env")"
|
||||
fi
|
||||
|
||||
if [[ -z "${api_key}" ]]; then
|
||||
echo "FAIL: brak API_KEY w ${PROD_ENV}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if curl -sf -X POST "http://127.0.0.1:${UI_PORT}/api/auth/verify" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"api_key\":\"${api_key}\"}" >/dev/null; then
|
||||
echo "OK: klucz z ${PROD_ENV} działa na http://127.0.0.1:${UI_PORT}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "FAIL: klucz z ${PROD_ENV} odrzucony przez server-ui (:${UI_PORT})"
|
||||
echo " Uruchom: bash ${SCRIPT_DIR}/show-api-key.sh"
|
||||
echo " Sync env: sudo bash ${SCRIPT_DIR}/setup-control-plane-env.sh"
|
||||
echo " Restart: sudo systemctl restart server-ui"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user