359afb3a59
Infrastructure configs for GMKtec K11 (Docker, vLLM, LocalAI, ComfyUI, control-plane, gpu-fan agent, Server UI with CLI/file explorer/GPU fan curve). Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
795 B
Bash
Executable File
25 lines
795 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Show API key and step-by-step browser instructions for Server UI.
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
STACK_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
REPO_ROOT="$(cd "${STACK_DIR}/../.." && pwd)"
|
|
PROD_ENV="/opt/control-plane/.env"
|
|
DEV_ENV="${REPO_ROOT}/stacks/control-plane/.env"
|
|
UI_PORT=8091
|
|
|
|
if [[ -f "${DEV_ENV}" ]]; then
|
|
UI_PORT="$(grep '^SERVER_UI_PORT=' "${DEV_ENV}" 2>/dev/null | cut -d= -f2- || echo 8091)"
|
|
fi
|
|
|
|
# Prefer dev copy when readable (same key after sync); else production.
|
|
ENV_FILE="${DEV_ENV}"
|
|
if [[ ! -r "${ENV_FILE}" ]]; then
|
|
ENV_FILE="${PROD_ENV}"
|
|
fi
|
|
|
|
# shellcheck source=print-api-key-instructions.sh
|
|
source "${SCRIPT_DIR}/print-api-key-instructions.sh"
|
|
print_api_key_instructions "${ENV_FILE}" "${UI_PORT}"
|