From 6c1c889ef70af30ab60e1173b6456dbed2a34580 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 4 Jan 2024 21:15:13 -0800 Subject: [PATCH] fix: revert to node for container image --- Dockerfile | 10 +++++----- src/lib/constants.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f5af73b..504cfff6 100644 --- a/Dockerfile +++ b/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"] \ No newline at end of file diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 60832c73..27744197 100644 --- a/src/lib/constants.ts +++ b/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`;