mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
ci: adapt for current webui
This commit is contained in:
@@ -12,7 +12,7 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
COPY --from=node /app/web/dist ./web/dist
|
COPY --from=node /app/web/out ./web/out
|
||||||
|
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt install gcc -y \
|
&& apt install gcc -y \
|
||||||
|
|||||||
@@ -65,11 +65,19 @@ class HTTPController:
|
|||||||
ginst = g(self.ap, self.quart_app)
|
ginst = g(self.ap, self.quart_app)
|
||||||
await ginst.initialize()
|
await ginst.initialize()
|
||||||
|
|
||||||
frontend_path = "web/dist"
|
frontend_path = "web/out"
|
||||||
|
|
||||||
@self.quart_app.route("/")
|
@self.quart_app.route("/")
|
||||||
async def index():
|
async def index():
|
||||||
return await quart.send_from_directory(frontend_path, "index.html")
|
return await quart.send_from_directory(frontend_path, "index.html")
|
||||||
|
|
||||||
|
@self.quart_app.route("/login")
|
||||||
|
async def login():
|
||||||
|
return await quart.send_from_directory(frontend_path, "login.html")
|
||||||
|
|
||||||
|
@self.quart_app.route("/home")
|
||||||
|
async def home():
|
||||||
|
return await quart.send_from_directory(frontend_path, "home.html")
|
||||||
|
|
||||||
@self.quart_app.route("/<path:path>")
|
@self.quart_app.route("/<path:path>")
|
||||||
async def static_file(path: str):
|
async def static_file(path: str):
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class Application:
|
|||||||
async def print_web_access_info(self):
|
async def print_web_access_info(self):
|
||||||
"""打印访问 webui 的提示"""
|
"""打印访问 webui 的提示"""
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(".", "web/dist")):
|
if not os.path.exists(os.path.join(".", "web/out")):
|
||||||
self.logger.warning("WebUI 文件缺失,请根据文档获取:https://docs.langbot.app/webui/intro.html")
|
self.logger.warning("WebUI 文件缺失,请根据文档获取:https://docs.langbot.app/webui/intro.html")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import type { NextConfig } from "next";
|
|||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
/* config options here */
|
/* config options here */
|
||||||
|
output: 'export'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user