Skip to content

Update README.md

Update README.md #4

# 使用官方 Python 基础镜像
FROM python:3.9-slim

Check failure on line 2 in .github/workflows/docker-compose.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-compose.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
# 设置工作目录
WORKDIR /app
# 设置环境变量
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TZ=Asia/Shanghai
# 安装系统依赖
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
libmagic1 \
&& rm -rf /var/lib/apt/lists/* \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone
# 复制项目文件
COPY requirements.txt .
# 安装Python依赖
RUN pip install --no-cache-dir -r requirements.txt
# 复制应用程序代码
COPY . .
# 创建必要的目录
RUN mkdir -p static/audio \
&& chmod -R 755 static
# 暴露端口
EXPOSE 8005
# 启动命令
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8005"]