embed / Dockerfile
stnh70's picture
Update Dockerfile
b1b4bfc verified
raw
history blame contribute delete
641 Bytes
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