2026-01-24 22:01:00 +08:00
|
|
|
# Backend Development Dockerfile
|
|
|
|
|
FROM python:3.12-slim
|
|
|
|
|
|
|
|
|
|
# Install system dependencies
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
|
curl \
|
|
|
|
|
build-essential \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Install uv
|
|
|
|
|
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
|
ENV PATH="/root/.local/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-02-09 21:59:13 +08:00
|
|
|
# Copy frontend source code
|
|
|
|
|
COPY backend ./backend
|
|
|
|
|
|
2026-02-12 11:02:09 +08:00
|
|
|
# Install dependencies with cache mount
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
|
|
|
sh -c "cd backend && uv sync"
|
2026-02-09 21:59:13 +08:00
|
|
|
|
2026-01-24 22:01:00 +08:00
|
|
|
# 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"]
|