mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(open-webui): add open-webui template
This commit is contained in:
parent
4d251271b9
commit
152a54b251
BIN
public/templates/open-webui.png
Normal file
BIN
public/templates/open-webui.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
39
templates/open-webui/docker-compose.yml
Normal file
39
templates/open-webui/docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
|
||||
ollama:
|
||||
volumes:
|
||||
- ollama:/root/.ollama
|
||||
container_name: ollama
|
||||
networks:
|
||||
- dokploy-network
|
||||
pull_policy: always
|
||||
tty: true
|
||||
restart: unless-stopped
|
||||
image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest}
|
||||
|
||||
open-webui:
|
||||
image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main}
|
||||
container_name: open-webui
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- open-webui:/app/backend/data
|
||||
depends_on:
|
||||
- ollama
|
||||
environment:
|
||||
- 'OLLAMA_BASE_URL=http://ollama:11434'
|
||||
- 'WEBUI_SECRET_KEY='
|
||||
restart: unless-stopped
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${HASH}.rule=Host(`${OPEN_WEBUI_HOST}`)"
|
||||
- "traefik.http.services.${HASH}.loadbalancer.server.port=${OPEN_WEBUI_PORT}"
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
ollama: {}
|
||||
open-webui: {}
|
22
templates/open-webui/index.ts
Normal file
22
templates/open-webui/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
type Template,
|
||||
type Schema,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const envs = [
|
||||
`OPEN_WEBUI_HOST=${randomDomain}`,
|
||||
"OPEN_WEBUI_PORT=8080",
|
||||
`HASH=${mainServiceHash}`,
|
||||
'OLLAMA_DOCKER_TAG=latest',
|
||||
'WEBUI_DOCKER_TAG=main'
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
@ -318,4 +318,18 @@ export const templates: TemplateData[] = [
|
||||
tags: ["hosting"],
|
||||
load: () => import("./glitchtip/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: 'open-webui',
|
||||
name: 'Open WebUI',
|
||||
version: 'latest',
|
||||
description: 'Open WebUI is a free and open source chatgpt alternative. Open WebUI is an extensible, feature-rich, and user-friendly self-hosted WebUI designed to operate entirely offline. It supports various LLM runners, including Ollama and OpenAI-compatible APIs. The template include ollama and webui services.',
|
||||
logo: 'open-webui.png',
|
||||
links: {
|
||||
github: 'https://github.com/open-webui/open-webui',
|
||||
website: 'https://openwebui.com/',
|
||||
docs: 'https://docs.openwebui.com/',
|
||||
},
|
||||
tags: ['chat'],
|
||||
load: () => import('./open-webui/index').then((m) => m.generate),
|
||||
}
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user