File size: 578 Bytes
94582e2 9f66d9e 94582e2 4ba6ee0 94582e2 054f33d 94582e2 054f33d 94582e2 ef22198 054f33d f29eb0d b480bbd 94582e2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
FROM denoland/deno:alpine
# 创建工作目录
WORKDIR /app
# 复制所有文件
COPY . .
# 缓存主程序
RUN deno cache deno.ts
# 设置入口点,指向thunderapi子目录中的文件
ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write", "deno.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 7860 |