deerflow2/backend/Dockerfile

28 lines
699 B
Docker

# Backend Development Dockerfile
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
docker.io \
&& rm -rf /var/lib/apt/lists/*
RUN pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
# Set working directory
WORKDIR /app
# Copy frontend source code
COPY backend ./backend
# Install dependencies with cache mount
RUN --mount=type=cache,target=/root/.cache/uv \
sh -c "cd backend && uv sync"
# Expose ports (gateway: 8001, langgraph: 2024)
EXPOSE 8001 2024
# Default command (can be overridden in docker-compose)
CMD ["sh", "-c", "uv run uvicorn src.gateway.app:app --host 0.0.0.0 --port 8001"]