This commit is contained in:
hailin 2025-05-19 09:53:12 +08:00
parent 23f386836d
commit 2409fb548b
11 changed files with 25 additions and 25 deletions

View File

@ -409,7 +409,7 @@ COPY --from=s3final node_modules /supabase/storage-api/node_modules
COPY --from=s3final dist /supabase/storage-api/dist
COPY --from=s3final migrations /supabase/storage-api/migrations
#========================================= chatai-ui ========================================================
#========================================= chatdesk-ui ========================================================
# # 拷贝依赖声明并安装仅生产依赖
COPY chatdesk-ui/package.json chatdesk-ui/package-lock.json supabase/chatdesk/
WORKDIR /supabase/chatdesk

View File

@ -42,4 +42,4 @@ ENV NODE_ENV=production
EXPOSE 3000
# 正确使用 pm2-runtime 保持容器挂起
CMD ["pm2-runtime", "start", "npm", "--name", "chatai-ui", "--", "run", "start"]
CMD ["pm2-runtime", "start", "npm", "--name", "chatdesk-ui", "--", "run", "start"]

View File

@ -14,10 +14,10 @@ import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入
import Script from "next/script"
const inter = Inter({ subsets: ["latin"] })
const APP_NAME = "ChatAI UI"
const APP_DEFAULT_TITLE = "ChatAI UI"
const APP_TITLE_TEMPLATE = "%s - ChatAI UI"
const APP_DESCRIPTION = "ChaAI UI PWA!"
const APP_NAME = "ChatDesk UI"
const APP_DEFAULT_TITLE = "ChatDesk UI"
const APP_TITLE_TEMPLATE = "%s - ChatDesk UI"
const APP_DESCRIPTION = "ChatDesk UI PWA!"
interface RootLayoutProps {
children: ReactNode

View File

@ -10,7 +10,7 @@ export const FinishStep: FC<FinishStepProps> = ({ displayName }) => {
return (
<div className="space-y-4">
<div>
{t("setup.WelcomeToChatAIUI")}
{t("setup.WelcomeToChatDeskUI")}
{displayName.length > 0 ? `, ${displayName.split(" ")[0]}` : null}!
</div>

View File

@ -11,7 +11,7 @@
"prebuild": "node scripts/generate-env.js",
"build": "next build",
"start": "next start -H 0.0.0.0 -p 3030",
"start:prod": "npm run build && pm2 start npm --name \"chatai-ui\" -- run start",
"start:prod": "npm run build && pm2 start npm --name \"chatdesk-ui\" -- run start",
"lint": "next lint",
"lint:fix": "next lint --fix",
"analyze": "ANALYZE=true npm run build",

View File

@ -10,7 +10,7 @@
"setup": {
"LetsCreateYourProfile": "Let's create your profile.",
"WelcomeToChatbotUI": "Welcome to ChatAI UI",
"WelcomeToChatbotUI": "Welcome to ChatDesk UI",
"EnterAPIKeysForEachServiceYoudLikeToUse": "Enter API keys for each service you'd like to use.",
"SetAPIKeysOptional": "Set API Keys (optional)",
"YouAreAllSetUp": "You are all set up!",
@ -36,7 +36,7 @@
"switchToAzureOpenAI": "Switch To Azure OpenAI",
"back": "Back",
"next": "Next",
"WelcomeToChatAIUI": "Welcome to the Enterprise AI Chat Platform",
"WelcomeToChatDeskUI": "Welcome to the Enterprise AI Chat Platform",
"ClickNextToStartChatting": "Click Next to start chatting with the AI."
},

View File

@ -10,7 +10,7 @@
"setup": {
"LetsCreateYourProfile": "プロフィールを作成しましょう。",
"WelcomeToChatbotUI": "ChatAI UIへようこそ",
"WelcomeToChatbotUI": "ChatDesk UIへようこそ",
"EnterAPIKeysForEachServiceYoudLikeToUse": "使用する各サービスのAPIキーを入力してください。",
"SetAPIKeysOptional": "APIキーの設定オプション",
"YouAreAllSetUp": "設定が完了しました!",
@ -36,7 +36,7 @@
"switchToAzureOpenAI": "Azure OpenAI に切り替え",
"back": "戻る",
"next": "次へ",
"WelcomeToChatAIUI": "エンタープライズAIチャットプラットフォームへようこそ",
"WelcomeToChatDeskUI": "エンタープライズAIチャットプラットフォームへようこそ",
"ClickNextToStartChatting": "「次へ」をクリックして AI との対話を始めましょう。"
},

View File

@ -10,7 +10,7 @@
"setup": {
"LetsCreateYourProfile": "让我们来创建您的个人资料。",
"WelcomeToChatbotUI": "欢迎使用 ChatAI UI",
"WelcomeToChatbotUI": "欢迎使用 ChatDesk 通用AI对话工具前端界面",
"EnterAPIKeysForEachServiceYoudLikeToUse": "输入您希望使用的每个服务的 API 密钥。",
"SetAPIKeysOptional": "设置 API 密钥(可选)",
"YouAreAllSetUp": "设置完成!",
@ -36,7 +36,7 @@
"switchToAzureOpenAI": "切换为 Azure OpenAI",
"back": "返回",
"next": "下一步",
"WelcomeToChatAIUI": "欢迎使用企业AI对话平台",
"WelcomeToChatDeskUI": "欢迎使用企业AI对话平台",
"ClickNextToStartChatting": "点击“下一步”开始与 AI 对话。"
},

View File

@ -25,14 +25,14 @@ echo "🚀 Starting database initialization..."
# 执行 migrations
echo "📂 Running migrations..."
for file in $(ls /supabase/chatai-ui/supabase/migrations/*.sql | sort); do
for file in $(ls /supabase/chatdesk-ui/supabase/migrations/*.sql | sort); do
echo " ▶ Executing $file"
psql -f "$file"
done
# 执行 seed.sql
echo "🌱 Running seed.sql..."
psql -f /supabase/chatai-ui/supabase/seed.sql
psql -f /supabase/chatdesk-ui/supabase/seed.sql
# 写入初始化标记
touch "$FLAG_FILE"

View File

@ -3,10 +3,10 @@ set -euo pipefail
export SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
echo "[chatai-ui] Waiting for Kong to proxy PostgREST..."
echo "[chatdesk-ui] Waiting for Kong to proxy PostgREST..."
until curl -s -o /dev/null -w "%{http_code}" -H "apikey: $SUPABASE_ANON_KEY" http://localhost:8000/rest/v1/ | grep -qE "^(200|401|403)$"; do
echo "[chatai-ui] Still waiting for /rest/v1/ ..."
echo "[chatdesk-ui] Still waiting for /rest/v1/ ..."
sleep 1
done
@ -19,12 +19,12 @@ fi
# ✅ 删除旧的 env.js如果存在
ENV_FILE="/supabase/chatdesk/public/env.js"
if [ -f "$ENV_FILE" ]; then
echo "[chatai-ui] Removing old env.js"
echo "[chatdesk-ui] Removing old env.js"
rm -f "$ENV_FILE"
fi
# ✅ 写入新的 env.js
echo "[chatai-ui] Writing env.js with SUPABASE_URL=$SUPABASE_URL"
echo "[chatdesk-ui] Writing env.js with SUPABASE_URL=$SUPABASE_URL"
cat <<EOF > "$ENV_FILE"
window.RUNTIME_ENV = {
"SUPABASE_URL": "${SUPABASE_URL}"
@ -32,7 +32,7 @@ window.RUNTIME_ENV = {
EOF
echo "[chatai-ui] API is reachable via Kong. Starting UI..."
echo "[chatdesk-ui] API is reachable via Kong. Starting UI..."
/bin/bash /supabase/chatdesk/init.sh

View File

@ -53,9 +53,9 @@ redirect_stderr=true
stdout_logfile=auto
[program:chatai-ui]
command=/bin/bash /supabase/chatai-ui/wrapper.sh
[program:chatdesk-ui]
command=/bin/bash /supabase/chatdesk-ui/wrapper.sh
user=root
autorestart=true
stderr_logfile=/var/log/chatai-ui.err.log
stdout_logfile=/var/log/chatai-ui.out.log
stderr_logfile=/var/log/chatdesk-ui.err.log
stdout_logfile=/var/log/chatdesk-ui.out.log