diff --git a/apps/dokploy/public/templates/lobe-chat.png b/apps/dokploy/public/templates/lobe-chat.png new file mode 100644 index 00000000..cc29879c Binary files /dev/null and b/apps/dokploy/public/templates/lobe-chat.png differ diff --git a/apps/dokploy/server/api/routers/compose.ts b/apps/dokploy/server/api/routers/compose.ts index e9ccd33b..441e1f80 100644 --- a/apps/dokploy/server/api/routers/compose.ts +++ b/apps/dokploy/server/api/routers/compose.ts @@ -357,9 +357,9 @@ export const composeRouter = createTRPCRouter({ const generate = await loadTemplateModule(input.id as TemplatesKeys); const admin = await findAdminById(ctx.user.adminId); - let serverIp = admin.serverIp; + let serverIp = admin.serverIp || "127.0.0.1"; - if (!admin.serverIp) { + if (!serverIp) { throw new TRPCError({ code: "NOT_FOUND", message: diff --git a/apps/dokploy/templates/lobe-chat/docker-compose.yml b/apps/dokploy/templates/lobe-chat/docker-compose.yml new file mode 100644 index 00000000..67614090 --- /dev/null +++ b/apps/dokploy/templates/lobe-chat/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' + +services: + lobe-chat: + image: lobehub/lobe-chat:v1.26.1 + restart: always + ports: + - 3210 + environment: + OPENAI_API_KEY: sk-xxxx + OPENAI_PROXY_URL: https://api-proxy.com/v1 + ACCESS_CODE: lobe66 \ No newline at end of file diff --git a/apps/dokploy/templates/lobe-chat/index.ts b/apps/dokploy/templates/lobe-chat/index.ts new file mode 100644 index 00000000..a07a4e09 --- /dev/null +++ b/apps/dokploy/templates/lobe-chat/index.ts @@ -0,0 +1,22 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 3210, + serviceName: "lobe-chat", + }, + ]; + + return { + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 86eb9942..c43ffc20 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -569,6 +569,20 @@ export const templates: TemplateData[] = [ docs: "https://docs.stirlingpdf.com/", }, tags: ["pdf", "tools"], - load: () => import("./portainer/index").then((m) => m.generate), + load: () => import("./stirling/index").then((m) => m.generate), + }, + { + id: "lobe-chat", + name: "Lobe Chat", + version: "v1.26.1", + description: "Lobe Chat - an open-source, modern-design AI chat framework.", + logo: "lobe-chat.png", + links: { + github: "https://github.com/lobehub/lobe-chat", + website: "https://chat-preview.lobehub.com/", + docs: "https://lobehub.com/docs/self-hosting/platform/docker-compose", + }, + tags: ["IA", "chat"], + load: () => import("./lobe-chat/index").then((m) => m.generate), }, ];