初始提交:当前多摄像头监控系统代码

This commit is contained in:
Hao Wang
2025-12-07 01:51:13 +08:00
commit e991e0e7e6
8 changed files with 1049 additions and 0 deletions

36
Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
# 多摄像头实时监控系统 Docker镜像
FROM python:3.9-slim
# 设置工作目录
WORKDIR /app
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# 安装系统依赖
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用文件
COPY . .
# 创建日志目录
RUN mkdir -p /var/log/multi_camera
# 暴露端口
EXPOSE 5002
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:5002/status || exit 1
# 设置启动命令
CMD ["python3", "complete_multi_camera_app.py"]