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

Timothy J. Baek's avatar
Timothy J. Baek committed
3
FROM node:alpine as build
4

Timothy J. Baek's avatar
Timothy J. Baek committed
5
ARG OLLAMA_API_BASE_URL='/ollama/api'
6
RUN echo $OLLAMA_API_BASE_URL
7

8
9
ENV PUBLIC_API_BASE_URL $OLLAMA_API_BASE_URL
RUN echo $PUBLIC_API_BASE_URL
10

Timothy J. Baek's avatar
Timothy J. Baek committed
11
12
WORKDIR /app

Timothy J. Baek's avatar
Timothy J. Baek committed
13
14
15
16
17
18
COPY package.json package-lock.json ./ 
RUN npm ci

COPY . .
RUN npm run build

Timothy J. Baek's avatar
Timothy J. Baek committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM python:3.11-slim-buster as base

ARG OLLAMA_API_BASE_URL='/ollama/api'

ENV ENV=prod
ENV OLLAMA_API_BASE_URL $OLLAMA_API_BASE_URL

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 .

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