mirror of
https://github.com/open-webui/open-webui
synced 2025-04-02 12:09:06 +00:00
1st commit
This commit is contained in:
parent
b03fc97e28
commit
4eb7fdccf1
@ -21,11 +21,15 @@ ARG UID=0
|
||||
ARG GID=0
|
||||
|
||||
######## WebUI frontend ########
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine3.20 AS build
|
||||
FROM node:22-alpine3.20 AS build
|
||||
ARG BUILD_HASH
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Add this line to increase Node.js memory limit
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
:: This method is not recommended, and we recommend you use the `start.sh` file with WSL instead.
|
||||
@echo off
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
@ -6,6 +5,9 @@ SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
SET "SCRIPT_DIR=%~dp0"
|
||||
cd /d "%SCRIPT_DIR%" || exit /b
|
||||
|
||||
:: Activate the conda environment (replace 'open-webui' with your environment name)
|
||||
CALL conda activate open-webui
|
||||
|
||||
:: Add conditional Playwright browser installation
|
||||
IF /I "%RAG_WEB_LOADER_ENGINE%" == "playwright" (
|
||||
IF "%PLAYWRIGHT_WS_URI%" == "" (
|
||||
@ -13,7 +15,6 @@ IF /I "%RAG_WEB_LOADER_ENGINE%" == "playwright" (
|
||||
playwright install chromium
|
||||
playwright install-deps chromium
|
||||
)
|
||||
|
||||
python -c "import nltk; nltk.download('punkt_tab')"
|
||||
)
|
||||
|
||||
@ -42,3 +43,6 @@ IF "%WEBUI_SECRET_KEY%%WEBUI_JWT_SECRET_KEY%" == " " (
|
||||
:: Execute uvicorn
|
||||
SET "WEBUI_SECRET_KEY=%WEBUI_SECRET_KEY%"
|
||||
uvicorn open_webui.main:app --host "%HOST%" --port "%PORT%" --forwarded-allow-ips '*'
|
||||
|
||||
:: Keep the window open
|
||||
pause
|
||||
|
21
cloudbuild.yaml
Normal file
21
cloudbuild.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
steps:
|
||||
# Build the container image
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args: ['build', '-t', 'us-central1-docker.pkg.dev/ceylonally/ghcr/open-webui/open-webui:$COMMIT_SHA', '.']
|
||||
# Push the container image
|
||||
- name: 'gcr.io/cloud-builders/docker'
|
||||
args: ['push', 'us-central1-docker.pkg.dev/ceylonally/ghcr/open-webui/open-webui:$COMMIT_SHA']
|
||||
# Deploy to Cloud Run
|
||||
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
|
||||
entrypoint: gcloud
|
||||
args:
|
||||
- 'run'
|
||||
- 'deploy'
|
||||
- 'ceylonally'
|
||||
- '--image'
|
||||
- 'us-central1-docker.pkg.dev/ceylonally/ghcr/open-webui/open-webui:$COMMIT_SHA'
|
||||
- '--region'
|
||||
- 'us-central1'
|
||||
- '--memory'
|
||||
- '4Gi'
|
||||
- '--allow-unauthenticated'
|
Loading…
Reference in New Issue
Block a user