diff --git a/.gitignore b/.gitignore index 557d6e3d..7d870c33 100644 --- a/.gitignore +++ b/.gitignore @@ -52,11 +52,3 @@ src/langbot/web/ /dist /build *.egg-info - -# Docker 部署产生的本地文件 -docker/data/ -docker/docker-compose.override.yaml - -# 备份目录 -LangBot_backup_*/ -*.bak diff --git a/Dockerfile b/Dockerfile index 6e00dc2c..b30d21b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,18 +10,14 @@ FROM python:3.12.7-slim WORKDIR /app -# Use Chinese mirror for faster and more reliable package downloads -RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || \ - sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list 2>/dev/null || true - COPY . . COPY --from=node /app/web/out ./web/out RUN apt update \ && apt install gcc -y \ - && python -m pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple uv \ - && uv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple \ + && python -m pip install --no-cache-dir uv \ + && uv sync \ && touch /.dockerenv CMD [ "uv", "run", "--no-sync", "main.py" ] \ No newline at end of file