-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (25 loc) · 858 Bytes
/
Dockerfile
File metadata and controls
30 lines (25 loc) · 858 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
# Stage 1: Build the React frontend
FROM node:18 as build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# Stage 2: Set up the Python backend
FROM python:3.9-slim
WORKDIR /app
# pdflatex is required for /api/generate-resume (resume PDF compilation)
RUN apt-get update && apt-get install -y --no-install-recommends \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /app/frontend/build ./frontend/build
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Expose the port the app runs on
EXPOSE 8080
# Command to run the application
CMD ["gunicorn", "-b", "0.0.0.0:8080", "--timeout", "300", "backend.app:app"]