-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile copy
59 lines (41 loc) · 1.64 KB
/
Dockerfile copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Base image
FROM python:3.11-slim
LABEL maintainer="Stefan Bogdanel <[email protected]>"
# Install OS dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl nodejs gcc g++ make procps libssl-dev npm \
htop mlocate supervisor software-properties-common git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# FRONTEND
# Install NVM and NodeJS
ENV NVM_DIR=/usr/local/nvm
ENV NODE_VERSION=v23.3.0
RUN mkdir -p $NVM_DIR && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"
ENV NODE_PATH=$NVM_DIR/versions/node/$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
COPY frontend /home/frontend/
COPY frontend/package.json /home/frontend/package.json
WORKDIR /home/frontend/
RUN npm install --force
#RUN npm run build
#Now copy to Return-Receipt-To:
# Upgrade pip and install pipx
RUN pip install --no-cache-dir --upgrade pip \
&& pip install pipx \
&& pip install poetry
# Set up FastAPI app
WORKDIR /home/backend
COPY backend .
RUN pip install --no-cache-dir --upgrade -r requirements.txt \
&& pip install fastapi-versioning pymupdf4llm python-multipart yake tls_client uvicorn litellm
# Clean up
RUN apt-get autoremove -y \
&& apt-get clean \
&& updatedb
# Copy Supervisor configuration
COPY docker/supervisord.conf /etc/supervisord.conf
# Expose application ports
EXPOSE 1100 1101
# Run application
ENTRYPOINT ["supervisord", "-c", "/etc/supervisord.conf", "-n"]