stnh70 commited on
Commit
36955ec
·
verified ·
1 Parent(s): e2a4c95

Create Dockerfile

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