Explorar o código

Merge pull request #387 from ollama-webui/fix

fix: revert to node for container image
Timothy Jaeryang Baek hai 1 ano
pai
achega
1c6b59ee46
Modificáronse 2 ficheiros con 6 adicións e 6 borrados
  1. 5 5
      Dockerfile
  2. 1 1
      src/lib/constants.ts

+ 5 - 5
Dockerfile

@@ -1,14 +1,14 @@
 # syntax=docker/dockerfile:1
 
-FROM oven/bun:latest as build
+FROM node:alpine as build
 
 WORKDIR /app
 
 COPY package.json package-lock.json ./ 
-COPY . .
+RUN npm ci
 
-RUN bun install
-RUN bun run build
+COPY . .
+RUN npm run build
 
 FROM python:3.11-slim-buster as base
 
@@ -32,4 +32,4 @@ RUN pip3 install -r requirements.txt
 
 COPY ./backend .
 
-CMD [ "sh", "start.sh"]
+CMD [ "sh", "start.sh"]

+ 1 - 1
src/lib/constants.ts

@@ -1,6 +1,6 @@
 import { dev } from '$app/environment';
 
-export const WEBUI_BASE_URL = ``;
+export const WEBUI_BASE_URL = dev ? `http://${location.hostname}:8080` : ``;
 
 export const WEBUI_API_BASE_URL = `${WEBUI_BASE_URL}/api/v1`;
 export const OLLAMA_API_BASE_URL = `${WEBUI_BASE_URL}/ollama/api`;