kernelmind/Resume-Screener-API
0
1# Stage 1: Build the Frontend2FROM node:20-slim AS frontend-builder3WORKDIR /app/frontend-next4COPY frontend-next/package*.json ./5RUN npm install6COPY frontend-next/ ./7ENV NEXT_PUBLIC_API_URL=""8RUN npm run build9 10# Stage 2: Final Runtime11FROM python:3.11-slim12RUN useradd -m -u 1000 user13USER user14ENV HOME=/home/user \15 PATH=/home/user/.local/bin:$PATH \16 PYTHONUNBUFFERED=117WORKDIR $HOME/app18 19# Copy dependency and metadata files first20COPY --chown=user pyproject.toml README.md .21# Copy src so the package can be installed22COPY --chown=user src/ ./src/23 24# Install dependencies25RUN pip install --no-cache-dir .26 27# Copy the rest of the backend code28COPY --chown=user . .29 30# Copy the built frontend from Stage 131COPY --from=frontend-builder --chown=user /app/frontend-next/out ./frontend-next/out32 33# Hugging Face expects port 786034CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]35 