This commit is contained in:
jeremygan2021
2026-03-04 19:16:25 +08:00
parent a810d70a22
commit 4c8e3a1a8d
4 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
.env
.DS_Store
output_images/
*.raw
*.mp3
generated_thumb.bin
test_generated_thumb.bin

View File

@@ -0,0 +1 @@
DASHSCOPE_API_KEY=sk-a294f382488d46a1aa0d7cd8e750729b

View File

@@ -0,0 +1,28 @@
FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
# 安装系统依赖
# ffmpeg: 用于音频格式转换
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# 复制依赖文件
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制项目文件
COPY . .
# 创建输出目录
RUN mkdir -p output_images
# 暴露端口
EXPOSE 8000
# 启动命令
CMD ["python", "server.py"]

View File

@@ -0,0 +1,12 @@
version: '3.8'
services:
websocket-server:
build: .
container_name: epaper-websocket-server
ports:
- "8000:8000"
volumes:
- ./output_images:/app/output_images
- ./.env:/app/.env
restart: unless-stopped