18 lines
406 B
Bash
Executable File
18 lines
406 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Launch the Homelab Dashboard API on homelab-vm.
|
|
# Sources .env (BAIKAL_PASS etc.) before handing off to uvicorn.
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$(readlink -f "$0")")"
|
|
|
|
if [[ -f .env ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
source ./.env
|
|
set +a
|
|
fi
|
|
|
|
exec /usr/bin/python3 /home/homelab/.local/bin/uvicorn main:app \
|
|
--host 0.0.0.0 --port "${DASHBOARD_API_PORT:-18888}"
|