Dockerfile 354 B

12345678910111213141516
  1. # 使用官方Python镜像作为基础镜像
  2. FROM python:3.10
  3. # 设置工作目录
  4. WORKDIR /app
  5. # 复制依赖文件到容器中
  6. COPY requirements.txt /app/
  7. RUN pip install --no-cache-dir -r requirements.txt
  8. # 复制你的项目文件到工作目录
  9. COPY . /app
  10. # 启动服务
  11. CMD ["hypercorn", "async_app:app", "--config", "hypercorn_config.toml"]