Files
pixel/backend/Dockerfile
张鹏 f9f4560459 Initial commit: Pixel AI comic/video creation platform
- FastAPI backend with SQLModel, Alembic migrations, AgentScope agents
- Next.js 15 frontend with React 19, Tailwind, Zustand, React Flow
- Multi-provider AI system (DashScope, Kling, MiniMax, Volcengine, OpenAI, etc.)
- All HTTP clients migrated from sync requests to async httpx
- Admin-managed API keys via environment variables
- SSRF vulnerability fixed in ensure_url()
2026-04-29 01:20:12 +08:00

41 lines
865 B
Docker

FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN pip install uv
# Set working directory
WORKDIR /app
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Create virtual environment and install dependencies
# Using --frozen to ensure strict adherence to uv.lock
RUN uv sync --frozen --no-install-project
# Add virtual environment to PATH
ENV PATH="/app/.venv/bin:$PATH"
# Copy source code
COPY src ./src
# Install the project itself (if needed)
RUN uv sync --frozen
# Create directories for data/uploads if they don't exist
RUN mkdir -p data/uploads
# Expose port
EXPOSE 8000
# Start command
CMD ["uv", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]