-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (29 loc) · 771 Bytes
/
Dockerfile
File metadata and controls
35 lines (29 loc) · 771 Bytes
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
# Build React frontend
FROM node:18 AS build
WORKDIR /app
COPY frontend/package*.json frontend/
RUN npm ci --prefix frontend
COPY frontend/ frontend/
RUN npm run build --prefix frontend
# Python backend
FROM python:3.11
RUN apt-get update && apt-get install -y \
libxml2-dev \
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy ALL necessary files
COPY *.py ./
COPY *.json ./
COPY *.txt ./
COPY .env ./
COPY evaluations/ ./evaluations/
# Copy React build
COPY --from=build /app/frontend/build/ ./frontend/build/
# Expose port
EXPOSE 8000
# Start with Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--timeout", "600", "app:app"]