mirror of
https://github.com/Dokploy/templates.git
synced 2026-06-15 20:25:24 +02:00
Refactor open-webui Docker Compose and template configurations (#217)
* Refactor open-webui Docker Compose and template configurations - Commented out the ollama service in docker-compose.yml for clarity and potential future use. - Updated the webui service to include extra_hosts for improved networking. - Adjusted the port configuration in template.toml from 8_080 to 8080 for consistency. - Added a new webui_secret_key variable for enhanced security in the template. - Included environment variable comments for optional services like Playwright and stable-diffusion-webui. * Update Docker Compose configurations and enhance security features - Commented out the ollama service in docker-compose.yml for clarity. - Updated webui service with extra_hosts for improved networking. - Adjusted port configuration in template.toml to ensure consistency. - Introduced webui_secret_key variable for enhanced security. - Added comments for optional environment variables related to Playwright and stable-diffusion-webui. * Update Docker Compose and template configurations for Open WebUI - Refined the open-webui service in docker-compose.yml by specifying the main image tag and adding port configuration. - Enhanced environment variable setup for improved clarity and security, including the addition of webui_secret_key. - Updated template.toml to reflect the new structure for environment variables and mounts, ensuring consistency with docker-compose.yml. - Added comments for optional services like Ollama, Playwright, and Stable Diffusion to guide future configurations.
This commit is contained in:
committed by
GitHub
parent
8f887d08b8
commit
82c1680e86
3462
app/package-lock.json
generated
Normal file
3462
app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,25 +1,81 @@
|
||||
version: "3.8"
|
||||
# This is the main service for the Open WebUI interface.
|
||||
services:
|
||||
ollama:
|
||||
volumes:
|
||||
- ollama:/root/.ollama
|
||||
|
||||
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}
|
||||
image: ghcr.io/open-webui/open-webui:main
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 8080
|
||||
environment:
|
||||
# This should point to your Ollama instance.
|
||||
# It defaults to the internal 'ollama' service if you uncomment it below.
|
||||
- "OLLAMA_BASE_URL=http://ollama:11434"
|
||||
# Secret key for session data encryption. It is configured in the template.toml.
|
||||
- "WEBUI_SECRET_KEY=${webui_secret_key}"
|
||||
# --------------------------------------------------------------------------
|
||||
# Optional: To enable web Browse via Playwright, uncomment the following
|
||||
# lines AND the 'playwright' service definition below.
|
||||
# - 'WEB_LOADER_ENGINE=playwright'
|
||||
# - 'PLAYWRIGHT_WS_URL=ws://playwright:3000'
|
||||
# --------------------------------------------------------------------------
|
||||
# Optional: To enable image generation, uncomment the following lines AND
|
||||
# the 'stable-diffusion-webui' service definition below.
|
||||
# - 'ENABLE_IMAGE_GENERATION=true'
|
||||
# - 'AUTOMATIC1111_BASE_URL=http://stable-diffusion-webui:7860'
|
||||
# --------------------------------------------------------------------------
|
||||
volumes:
|
||||
- open-webui:/app/backend/data
|
||||
depends_on:
|
||||
- ollama
|
||||
environment:
|
||||
- "OLLAMA_BASE_URL=http://ollama:11434"
|
||||
- "WEBUI_SECRET_KEY="
|
||||
restart: unless-stopped
|
||||
# To use the internal Ollama and other optional services, uncomment the following 'depends_on' section.
|
||||
# Make sure to also uncomment the services you need below.
|
||||
# depends_on:
|
||||
# - ollama
|
||||
# - playwright
|
||||
# - stable-diffusion-webui
|
||||
extra_hosts:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
# -----------------------------------------------------------------------------------
|
||||
# Optional: Ollama Service
|
||||
# To enable local AI model hosting with Ollama, uncomment the following service.
|
||||
# services:
|
||||
# ollama:
|
||||
# image: ollama/ollama:latest
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - ollama:/root/.ollama
|
||||
# # --------------------------------------------------------------------------
|
||||
# # Optional: GPU Support (Uncomment the following lines to enable)
|
||||
# # deploy:
|
||||
# # resources:
|
||||
# # reservations:
|
||||
# # devices:
|
||||
# # - driver: nvidia
|
||||
# # count: 1
|
||||
# # capabilities: [gpu]
|
||||
# # --------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------
|
||||
# Optional: Playwright Service for Web Loader
|
||||
# To enable the web loader feature in Open WebUI, uncomment this service.
|
||||
# playwright:
|
||||
# image: mcr.microsoft.com/playwright:v1.49.1-noble
|
||||
# restart: unless-stopped
|
||||
# command: npx -y playwright@1.49.1 run-server --port 3000 --host 0.0.0.0
|
||||
# -----------------------------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------------------------
|
||||
# Optional: Stable Diffusion Service for Image Generation
|
||||
# To enable image generation, uncomment this service. (Note: AMD64/x86_64 only)
|
||||
# stable-diffusion-webui:
|
||||
# platform: linux/amd64
|
||||
# image: ghcr.io/neggles/sd-webui-docker:latest
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# CLI_ARGS: "--api --use-cpu all --precision full --no-half --skip-torch-cuda-test --ckpt /empty.pt --do-not-download-clip --disable-nan-check --disable-opt-split-attention"
|
||||
# volumes:
|
||||
# # You might need to adjust this volume based on your setup.
|
||||
# - ./sd-empty.pt:/empty.pt
|
||||
# -----------------------------------------------------------------------------------
|
||||
|
||||
volumes:
|
||||
ollama: {}
|
||||
open-webui: {}
|
||||
ollama: {}
|
||||
|
||||
@@ -1,14 +1,28 @@
|
||||
[variables]
|
||||
main_domain = "${domain}"
|
||||
webui_secret_key = "${password:32}"
|
||||
|
||||
[config]
|
||||
mounts = []
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "open-webui"
|
||||
port = 8_080
|
||||
port = 8080
|
||||
host = "${main_domain}"
|
||||
|
||||
[config.env]
|
||||
OLLAMA_DOCKER_TAG = "0.1.47"
|
||||
WEBUI_DOCKER_TAG = "0.3.7"
|
||||
# Secret key for signing JWTs for authentication.
|
||||
# A random key is generated by default.
|
||||
webui_secret_key = "${webui_secret_key}" # API Key
|
||||
|
||||
[[config.mounts]]
|
||||
serviceName = "open-webui"
|
||||
type = "volume"
|
||||
source = "open-webui"
|
||||
target = "/app/backend/data"
|
||||
|
||||
# Mount for the optional 'ollama' service.
|
||||
# This will be used if you uncomment the 'ollama' service in the docker-compose file.
|
||||
[[config.mounts]]
|
||||
serviceName = "ollama"
|
||||
type = "volume"
|
||||
source = "ollama"
|
||||
target = "/root/.ollama"
|
||||
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "templates",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
Reference in New Issue
Block a user