mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-07 06:02:52 +08:00
- 新增 nginx 服务作为前端和后端的代理 - 重新配置前端和后端服务,不再直接暴露端口 - 更新前端 Dockerfile,简化为静态文件服务器- 在 MarkdownViewer 组件中添加 ExternalLink 图标
24 lines
951 B
Docker
24 lines
951 B
Docker
FROM python:3.11-slim
|
|
|
|
|
|
RUN rm -f /etc/apt/sources.list && \
|
|
rm -rf /etc/apt/sources.list.d/* && \
|
|
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
|
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
|
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
|
apt-get update && \
|
|
apt-get install -y ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# 确保 PATH 中包含 ffmpeg 路径(可选)
|
|
ENV PATH="/usr/bin:${PATH}"
|
|
|
|
# 设置 Hugging Face 镜像源环境变量
|
|
ENV HF_ENDPOINT=https://hf-mirror.com
|
|
|
|
WORKDIR /app
|
|
COPY ./backend /app
|
|
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
|
|
|
|
CMD ["python", "main.py"]
|