Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
87c8467d
"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "9523ecb87fe5548bda971221b4383e1776c49f27"
Unverified
Commit
87c8467d
authored
Oct 22, 2023
by
AJ ONeal
Browse files
doc: how to build and test static site
parent
859adee3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
README.md
README.md
+43
-0
No files found.
README.md
View file @
87c8467d
...
@@ -65,6 +65,49 @@ docker build --build-arg OLLAMA_API_BASE_URL='https://example.com/api' -t ollama
...
@@ -65,6 +65,49 @@ docker build --build-arg OLLAMA_API_BASE_URL='https://example.com/api' -t ollama
docker run
-d
-p
3000:8080
--name
ollama-webui
--restart
always ollama-webui
docker run
-d
-p
3000:8080
--name
ollama-webui
--restart
always ollama-webui
```
```
## How to Build for Static Deployment
1.
Install
`node`
```
sh
# Mac, Linux
curl https://webi.sh/node@lts | sh
source
~/.config/envman/PATH.env
```
```
pwsh
# Windows
curl.exe https://webi.ms/node@lts | powershell
```
2.
Clone & Enter the project
```
sh
git clone https://github.com/ollama-webui/ollama-webui.git
pushd
./ollama-webui/
```
3.
Create and edit
`.env`
```
sh
cp
-RPp
example.env .env
```
4.
Run in dev mode, or build the site for deployment
-
Test in Dev mode:
```
sh
npm run dev
```
-
Build for Deploy:
\
(
`PUBLIC_API_BASE_URL`
will overwrite the value in
`.env`
)
```
sh
PUBLIC_API_BASE_URL
=
'https://example.com/api'
npm run build
```
5.
Test the build with
`caddy`
(or the server of your choice)
```
sh
curl https://webi.sh/caddy | sh
PUBLIC_API_BASE_URL
=
'https://localhost/api'
npm run build
caddy run
--envfile
.env
--config
./Caddyfile.localhost
```
## What's Next? 🚀
## What's Next? 🚀
### To-Do List 📝
### To-Do List 📝
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment