zyc df9147a554
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m20s
Build and Deploy Web / build-and-deploy (push) Successful in 59s
fix build
2026-02-12 15:03:28 +08:00

26 lines
678 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install system dependencies
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \
apt-get update && apt-get install -y gcc && rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt /app/
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
pip install --upgrade pip && pip install -r requirements.txt
# Copy project
COPY . /app/
# Create data directory for SQLite persistence
RUN mkdir -p /app/data
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]