stnh70 commited on
Commit
1b27f55
·
verified ·
1 Parent(s): 11367e1

Create Dockerfile

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