File size: 641 Bytes
1b27f55 b1b4bfc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
FROM denoland/deno:alpine
# 创建工作目录
WORKDIR /app
# 复制所有文件
COPY . .
# 缓存主程序
# RUN deno cache subtitle.ts
RUN deno cache --allow-import web.ts
# 设置入口点,指向thunderapi子目录中的文件
ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write","--allow-import", "web.ts"]
# 设置健康检查
# 健康检查 - 使用 wget(Alpine 默认包含)
# HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
# CMD wget --no-verbose --tries=1 --spider http://localhost:7860/headers || exit 1
# Hugging Face Spaces使用7860端口
EXPOSE 3000 |