forked from phoenix/litellm-mirror
Revert "[FIX] allow setting UI BASE path"
This commit is contained in:
parent
775ef8a786
commit
36ed40d555
2 changed files with 50 additions and 62 deletions
|
@ -7,13 +7,14 @@
|
||||||
echo
|
echo
|
||||||
pwd
|
pwd
|
||||||
|
|
||||||
# if UI_BASE_PATH env is set
|
|
||||||
if [ -z "$UI_BASE_PATH" ]; then
|
|
||||||
|
|
||||||
|
# only run this step for litellm enterprise, we run this if enterprise/enterprise_ui/_enterprise.json exists
|
||||||
|
if [ ! -f "enterprise/enterprise_ui/enterprise_colors.json" ]; then
|
||||||
|
echo "Admin UI - using default LiteLLM UI"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# only run this step for litellm enterprise, we run this if enterprise/enterprise_ui/_enterprise.json exists or env var UI_BASE_PATH is set
|
echo "Building Custom Admin UI..."
|
||||||
if [ -f "enterprise/enterprise_ui/enterprise_colors.json" ] || [ -n "${UI_BASE_PATH:-}" ]; then
|
|
||||||
echo "Building Admin UI..."
|
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
# Check if we are on macOS
|
# Check if we are on macOS
|
||||||
|
@ -45,14 +46,6 @@ if [ -f "enterprise/enterprise_ui/enterprise_colors.json" ] || [ -n "${UI_BASE_P
|
||||||
nvm use v18.17.0
|
nvm use v18.17.0
|
||||||
npm install -g npm
|
npm install -g npm
|
||||||
|
|
||||||
if [ -n "${UI_BASE_PATH:-}" ]; then
|
|
||||||
echo "Using UI_BASE_PATH: $UI_BASE_PATH"
|
|
||||||
|
|
||||||
# make a file call .env in ui/litellm-dashboard and store the UI_BASE_PATH in it
|
|
||||||
echo "UI_BASE_PATH=$UI_BASE_PATH" > ui/litellm-dashboard/.env
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
# copy _enterprise.json from this directory to /ui/litellm-dashboard, and rename it to ui_colors.json
|
# copy _enterprise.json from this directory to /ui/litellm-dashboard, and rename it to ui_colors.json
|
||||||
cp enterprise/enterprise_ui/enterprise_colors.json ui/litellm-dashboard/ui_colors.json
|
cp enterprise/enterprise_ui/enterprise_colors.json ui/litellm-dashboard/ui_colors.json
|
||||||
|
|
||||||
|
@ -67,8 +60,3 @@ if [ -f "enterprise/enterprise_ui/enterprise_colors.json" ] || [ -n "${UI_BASE_P
|
||||||
|
|
||||||
# return to root directory
|
# return to root directory
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
else
|
|
||||||
echo "Admin UI - using default LiteLLM UI"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'export',
|
output: 'export',
|
||||||
basePath: process.env.UI_BASE_PATH || '/ui',
|
basePath: '/ui',
|
||||||
};
|
};
|
||||||
|
|
||||||
nextConfig.experimental = {
|
nextConfig.experimental = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue