mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 04:00:16 +09:00
fix: missing files required for building
This commit is contained in:
parent
6a862372f7
commit
55cacfb7e2
@ -1,2 +1,3 @@
|
|||||||
public/serviceWorker.js
|
public/serviceWorker.js
|
||||||
app/mcp/mcp_config.json
|
app/mcp/mcp_config.json
|
||||||
|
app/mcp/mcp_config.default.json
|
@ -42,7 +42,7 @@ COPY --from=builder /app/.next/static ./.next/static
|
|||||||
COPY --from=builder /app/.next/server ./.next/server
|
COPY --from=builder /app/.next/server ./.next/server
|
||||||
|
|
||||||
RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
|
RUN mkdir -p /app/app/mcp && chmod 777 /app/app/mcp
|
||||||
COPY --from=builder /app/app/mcp/mcp_config.json /app/app/mcp/
|
COPY --from=builder /app/app/mcp/mcp_config.default.json /app/app/mcp/mcp_config.json
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
@ -365,6 +365,8 @@ export async function getMcpConfigFromFile(): Promise<McpConfigData> {
|
|||||||
// 更新 MCP 配置文件
|
// 更新 MCP 配置文件
|
||||||
async function updateMcpConfig(config: McpConfigData): Promise<void> {
|
async function updateMcpConfig(config: McpConfigData): Promise<void> {
|
||||||
try {
|
try {
|
||||||
|
// 确保目录存在
|
||||||
|
await fs.mkdir(path.dirname(CONFIG_PATH), { recursive: true });
|
||||||
await fs.writeFile(CONFIG_PATH, JSON.stringify(config, null, 2));
|
await fs.writeFile(CONFIG_PATH, JSON.stringify(config, null, 2));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
|
3
app/mcp/mcp_config.default.json
Normal file
3
app/mcp/mcp_config.default.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"mcpServers": {}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user