Files
t-youtube/Dockerfile
T
Gan, Jimmy a154bc7978 feat: notes + agent queue, frontend rebuild, pip mirror, gitignore sync_rotation.json
- Add video_notes table and agent_queue table for persistent notes and AI agent tasks
- Add API endpoints: POST/GET /api/notes/{id}, POST /api/notes/migrate, agent queue endpoints
- Rebuild frontend: fix duplicate loadVideos(), non-blocking localStorage migration, notes UI
- Switch pip install to Tsinghua mirror for faster downloads in China
- Add backend/sync_rotation.json to .gitignore (runtime state)
2026-07-08 02:23:00 +08:00

38 lines
884 B
Docker

# Stage 1: Build Svelte frontend
FROM node:20-alpine AS frontend-builder
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# Stage 2: Python runtime backend
FROM python:3.10-slim AS backend-runner
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install python packages
COPY backend/requirements.txt ./
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
# Copy built static frontend
COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
# Copy Python backend
COPY backend/ ./backend
# Directory setups for mounts
ENV DB_DIR=/app/data
ENV COOKIES_PATH=/app/config/cookies.txt
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["python", "backend/main.py"]