feat: 添加 Docker 支持及部署教程

This commit is contained in:
db52
2026-03-16 13:59:02 +08:00
parent 60de39cebd
commit 9e2d4decf2
3 changed files with 99 additions and 0 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create data directory
RUN mkdir -p data logs
# Expose port
EXPOSE 8000
# Environment variables
ENV PYTHONUNBUFFERED=1
# Run the application
CMD ["python", "webui.py"]