Dockerfile 534 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
# syntax=docker/dockerfile:1

3
FROM node:alpine as build
4

Timothy J. Baek's avatar
Timothy J. Baek committed
5
6
WORKDIR /app

Timothy J. Baek's avatar
Timothy J. Baek committed
7
COPY package.json package-lock.json ./ 
8
RUN npm ci
9

10
11
COPY . .
RUN npm run build
Timothy J. Baek's avatar
Timothy J. Baek committed
12

Timothy J. Baek's avatar
Timothy J. Baek committed
13
FROM python:3.11-bookworm as base
Timothy J. Baek's avatar
Timothy J. Baek committed
14
15

ENV ENV=prod
Timothy J. Baek's avatar
Timothy J. Baek committed
16
17

ENV OLLAMA_API_BASE_URL "/ollama/api"
Timothy J. Baek's avatar
Timothy J. Baek committed
18
19
20
21

ENV OPENAI_API_BASE_URL ""
ENV OPENAI_API_KEY ""

22
ENV WEBUI_JWT_SECRET_KEY "SECRET_KEY"
Timothy J. Baek's avatar
Timothy J. Baek committed
23
24
25
26
27
28
29
30
31
32
33

WORKDIR /app
COPY --from=build /app/build /app/build

WORKDIR /app/backend

COPY ./backend/requirements.txt ./requirements.txt
RUN pip3 install -r requirements.txt

COPY ./backend .

34
CMD [ "sh", "start.sh"]