diff --git a/docker-compose.a1111-test.yaml b/docker-compose.a1111-test.yaml deleted file mode 100644 index e6ab12c07f0..00000000000 --- a/docker-compose.a1111-test.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# This is an overlay that spins up stable-diffusion-webui for integration testing -# This is not designed to be used in production -services: - stable-diffusion-webui: - # Not built for ARM64 - 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" - PYTHONUNBUFFERED: "1" - TERM: "vt100" - SD_WEBUI_VARIANT: "default" - # Hack to get container working on Apple Silicon - # Rosetta creates a conflict ${HOME}/.cache folder - entrypoint: /bin/bash - command: - - -c - - | - export HOME=/root-home - rm -rf $${HOME}/.cache - /docker/entrypoint.sh python -u webui.py --listen --port $${WEBUI_PORT} --skip-version-check $${CLI_ARGS} - volumes: - - ./test/test_files/image_gen/sd-empty.pt:/empty.pt - - open-webui: - environment: - ENABLE_IMAGE_GENERATION: "true" - AUTOMATIC1111_BASE_URL: http://stable-diffusion-webui:7860 - IMAGE_SIZE: "64x64" - IMAGE_STEPS: "3" diff --git a/docker-compose.amdgpu.yaml b/docker-compose.amdgpu.yaml deleted file mode 100644 index 7a1295d9451..00000000000 --- a/docker-compose.amdgpu.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - ollama: - devices: - - /dev/kfd:/dev/kfd - - /dev/dri:/dev/dri - image: ollama/ollama:${OLLAMA_DOCKER_TAG-rocm} - environment: - - 'HSA_OVERRIDE_GFX_VERSION=${HSA_OVERRIDE_GFX_VERSION-11.0.0}' \ No newline at end of file diff --git a/docker-compose.api.yaml b/docker-compose.api.yaml deleted file mode 100644 index 8f8fbe59ad0..00000000000 --- a/docker-compose.api.yaml +++ /dev/null @@ -1,5 +0,0 @@ -services: - ollama: - # Expose Ollama API outside the container stack - ports: - - ${OLLAMA_WEBAPI_PORT-11434}:11434 diff --git a/docker-compose.data.yaml b/docker-compose.data.yaml deleted file mode 100644 index 4b70601f894..00000000000 --- a/docker-compose.data.yaml +++ /dev/null @@ -1,4 +0,0 @@ -services: - ollama: - volumes: - - ${OLLAMA_DATA_DIR-./ollama-data}:/root/.ollama diff --git a/docker-compose.full.yaml b/docker-compose.full.yaml new file mode 100644 index 00000000000..53840205842 --- /dev/null +++ b/docker-compose.full.yaml @@ -0,0 +1,122 @@ +name: open-webui-dev + +services: + frontend: + build: + context: . + target: build + command: ["sh", "/app/src/frontend-dev.sh"] + env_file: ".env" + environment: + - NODE_OPTIONS=--max-old-space-size=3300 + depends_on: + - backend + ports: + - "3000:5173" + extra_hosts: + - host.docker.internal:127.0.0.1 + volumes: + - ./src:/app/src + - ./package.json:/app/package.json + - ./package-lock.json:/app/package-lock.json + - ./static/assets:/app/static/assets + - ./static/avatars:/app/static/avatars + - ./static/data:/app/static/data + - ./static/favicon:/app/static/favicon + - ./static/static:/app/static/static + - ./vite.config.ts:/app/vite.config.ts + - ./svelte.config.js:/app/svelte.config.js + - ./tsconfig.json:/app/tsconfig.json + - ./tsconfig.ionos.json:/app/tsconfig.ionos.json + - ./tailwind.config.js:/app/tailwind.config.js + + backend: + build: + context: . + target: base + command: ["bash", "dev.sh"] + env_file: ".env" + environment: + - ENV=dev + # Storage: S3 + # Note: you've to configure a bucket and add secrets to your .env + # (see "storage" config at the bottom) + - STORAGE_PROVIDER=s3 + - S3_BUCKET_NAME=owu + - S3_ENDPOINT_URL=http://localhost:19000 + - S3_REGION_NAME=eu-central-1 + # Relational DB: postgres + - DATABASE_URL=postgresql://postgres:pass@localhost:5432/postgres + # Vector DB: postgres + - VECTOR_DB=pgvector + - PGVECTOR_DB_URL=postgresql://postgres:pass@localhost:5432/openwebui_vector + # Content extraction: tika + - CONTENT_EXTRACTION_ENGINE=tika + - TIKA_SERVER_URL=http://localhost:9998 + depends_on: + - pgvector + - storage + network_mode: host + ports: + - "8080:8080" + extra_hosts: + - localhost:127.0.0.1 + volumes: + - ./backend:/app/backend + - data:/app/backend/data + + tika: + image: apache/tika:2.5.0.2-full + network_mode: host + ports: + - "9998:9998" + environment: + - TIKA_LOG_LEVEL=INFO + + pgvector: + image: pgvector/pgvector:pg17 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: pass + POSTGRES_DB: postgres + network_mode: host + volumes: + - ./initdb.d:/docker-entrypoint-initdb.d + - pgdata:/var/lib/postgresql/data + + # Inspect pgvector at http://localhost:8081/?pgsql=127.0.0.1&username=postgres&db=postgres&ns=public + adminer: + image: adminer + network_mode: host + command: ["php", "-S", "127.0.0.1:8081", "-t", "/var/www/html"] + + keycloak: + image: quay.io/keycloak/keycloak:26.0.7-0 + command: ["start-dev", "--http-enabled=true", "--http-port=8079", "--log-level=info", "--import-realm"] + volumes: + - ./keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json + environment: + # Needed to create a config from scratch. Causing errors when using --import-realm + # - KC_BOOTSTRAP_ADMIN_USERNAME=admin + # - KC_BOOTSTRAP_ADMIN_PASSWORD=admin + - KC_FEATURES=persistent-user-sessions + network_mode: host + ports: + - "8079:8079" + + # To create a bucked run scripts/create-minio-bucket and + # add the generated credentialsto your .env + storage: + image: quay.io/minio/minio:RELEASE.2025-06-13T11-33-47Z + command: ["server", "/data", "--address", ":19000", "--console-address", ":8078"] + environment: + MINIO_ROOT_USER: "root" + MINIO_ROOT_PASSWORD: "toortoor" + network_mode: host + volumes: + - minio:/data + +volumes: + data: {} + pgdata: {} + minio: {} diff --git a/docker-compose.gpu.yaml b/docker-compose.gpu.yaml deleted file mode 100644 index de821235da4..00000000000 --- a/docker-compose.gpu.yaml +++ /dev/null @@ -1,11 +0,0 @@ -services: - ollama: - # GPU support - deploy: - resources: - reservations: - devices: - - driver: ${OLLAMA_GPU_DRIVER-nvidia} - count: ${OLLAMA_GPU_COUNT-1} - capabilities: - - gpu diff --git a/docker-compose.minimal.yaml b/docker-compose.minimal.yaml new file mode 100644 index 00000000000..f8aa49a5080 --- /dev/null +++ b/docker-compose.minimal.yaml @@ -0,0 +1,51 @@ +name: open-webui-dev + +services: + frontend: + build: + context: . + target: build + command: ["sh", "/app/src/frontend-dev.sh"] + env_file: ".env" + environment: + - NODE_OPTIONS=--max-old-space-size=3300 + depends_on: + - backend + ports: + - "3000:5173" + extra_hosts: + - host.docker.internal:127.0.0.1 + volumes: + - ./src:/app/src + - ./package.json:/app/package.json + - ./package-lock.json:/app/package-lock.json + - ./static/assets:/app/static/assets + - ./static/avatars:/app/static/avatars + - ./static/data:/app/static/data + - ./static/favicon:/app/static/favicon + - ./static/static:/app/static/static + - ./vite.config.ts:/app/vite.config.ts + - ./svelte.config.js:/app/svelte.config.js + - ./tsconfig.json:/app/tsconfig.json + - ./tsconfig.ionos.json:/app/tsconfig.ionos.json + - ./tailwind.config.js:/app/tailwind.config.js + + backend: + build: + context: . + target: base + command: ["bash", "dev.sh"] + env_file: ".env" + environment: + - ENV=dev + network_mode: host + ports: + - "8080:8080" + extra_hosts: + - localhost:127.0.0.1 + volumes: + - ./backend:/app/backend + - data:/app/backend/data + +volumes: + data: {} diff --git a/docker-compose.playwright.yaml b/docker-compose.playwright.yaml deleted file mode 100644 index fa2b49ff9a2..00000000000 --- a/docker-compose.playwright.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - playwright: - image: mcr.microsoft.com/playwright:v1.49.1-noble # Version must match requirements.txt - container_name: playwright - command: npx -y playwright@1.49.1 run-server --port 3000 --host 0.0.0.0 - - open-webui: - environment: - - 'WEB_LOADER_ENGINE=playwright' - - 'PLAYWRIGHT_WS_URL=ws://playwright:3000' diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 74249febd9e..00000000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,34 +0,0 @@ -services: - ollama: - volumes: - - ollama:/root/.ollama - container_name: ollama - pull_policy: always - tty: true - restart: unless-stopped - image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} - - open-webui: - build: - context: . - args: - OLLAMA_BASE_URL: '/ollama' - dockerfile: Dockerfile - image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} - container_name: open-webui - volumes: - - open-webui:/app/backend/data - depends_on: - - ollama - ports: - - ${OPEN_WEBUI_PORT-3000}:8080 - environment: - - 'OLLAMA_BASE_URL=http://ollama:11434' - - 'WEBUI_SECRET_KEY=' - extra_hosts: - - host.docker.internal:host-gateway - restart: unless-stopped - -volumes: - ollama: {} - open-webui: {} diff --git a/docs/IONOS/.env.ionos.sample b/docs/IONOS/.env.ionos.sample index f0d4f59c862..dd9be965497 100644 --- a/docs/IONOS/.env.ionos.sample +++ b/docs/IONOS/.env.ionos.sample @@ -9,6 +9,11 @@ RAG_OPENAI_API_KEY=... # Running Python code client side via Pyodide (via Webassembly) ENABLE_CODE_EXECUTION=false +# VectorDB +DATABASE_URL=postgresql://postgres:pass@localhost:5432/postgres +VECTOR_DB=pgvector +PGVECTOR_DB_URL=postgresql://postgres:pass@localhost:5432/openwebui_vector + # Whether to login automatically during development # WEBUI_AUTH: False = auto-login, True = allow subscribe + login (WEBUI_SECRET_KEY required) WEBUI_AUTH=True diff --git a/initdb.d/custom_init.sql b/initdb.d/custom_init.sql new file mode 100644 index 00000000000..adf538c5cbd --- /dev/null +++ b/initdb.d/custom_init.sql @@ -0,0 +1,3 @@ +CREATE DATABASE openwebui_vector; +\c openwebui_vector +CREATE EXTENSION vector; diff --git a/initdb.d/listen_on_localhost.sh b/initdb.d/listen_on_localhost.sh new file mode 100755 index 00000000000..92a0d6e2cbc --- /dev/null +++ b/initdb.d/listen_on_localhost.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Configure postgres Container image pgvector/pgvector:pg17 to listen on 127.0.0.1 +# Mount this file into container:/docker-entrypoint-initdb.d/ + +CONFIG="/var/lib/postgresql/data/postgresql.conf" + +echo '[pgvector-init] Ensure listen_addresses is 127.0.0.1 ...' + +if [ ! -f "${CONFIG}" ]; then + echo '[pgvector-init] ${CONFIG} missing! Waiting here.' + sleep infinity +fi + +if grep -qE "^listen_addresses = '127.0.0.1'" ${CONFIG}; then + echo '[pgvector-init] All fine.' +else + echo "listen_addresses = '127.0.0.1'" >> ${CONFIG} + echo '[pgvector-init] Configued.' +fi + +echo '[pgvector-init] Done.'