stnh70 commited on
Commit
62906c8
·
verified ·
1 Parent(s): 06ace5f

Create Dockerfile

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