ap / Dockerfile
stnh70's picture
Update Dockerfile
b480bbd verified
raw
history blame contribute delete
578 Bytes
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