Files
wehub-resource-sync 41b710f9c7
CI / Frontend checks (push) Failing after 0s
CI / Backend tests (push) Failing after 1s
I18n Documentation Sync / sync-docs (push) Failing after 0s
chore: import upstream snapshot with attribution
2026-07-13 12:28:40 +08:00

55 lines
1.1 KiB
Docker

# AutoClip 开发环境 Dockerfile
FROM python:3.9-slim
# 设置环境变量
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONPATH=/app
WORKDIR /app
# 安装系统依赖
RUN apt-get update && apt-get install -y \
build-essential \
curl \
ffmpeg \
git \
&& rm -rf /var/lib/apt/lists/*
# 安装Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs
# 复制Python依赖文件
COPY requirements.txt ./
# 创建虚拟环境并安装Python依赖
RUN python3 -m venv venv
RUN . venv/bin/activate && pip install --upgrade pip
RUN . venv/bin/activate && pip install -r requirements.txt
# 复制前端依赖文件
COPY frontend/package*.json ./frontend/
# 安装前端依赖
RUN cd frontend && npm install && npm run build
# 复制项目文件
COPY . .
# 复制开发环境启动脚本
COPY docker-dev-entrypoint.sh ./
# 创建必要的目录
RUN mkdir -p data/projects data/uploads data/temp data/output logs
# 设置权限
RUN chmod +x *.sh
RUN chmod +x docker-dev-entrypoint.sh
# 暴露端口
EXPOSE 8000 3000
# 启动命令
CMD ["./docker-dev-entrypoint.sh"]