TAM / Dockerfile
Claude
Fix port to 7860 for Hugging Face Spaces
fa7454c unverified
Raw
History Blame Contribute Delete
531 Bytes
FROM node:20-slim AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
FROM python:3.11-slim
WORKDIR /app
# Install backend deps
COPY backend/requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend source
COPY backend/ ./
# Copy built frontend into backend's static folder
COPY --from=frontend-builder /app/frontend/dist ./static
ENV PORT=7860
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT}"]