agreksandoval commited on
Commit
43e5782
1 Parent(s): bd38588

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用 multi-stage build
2
+ FROM cloudflare/cloudflared:latest as cloudflared
3
+
4
+ FROM node:20-slim as runner
5
+ WORKDIR /app
6
+
7
+ # 从 lobe-chat 复制所有文件,并保持正确的文件结构
8
+ COPY --from=lobehub/lobe-chat:latest /app /app
9
+ COPY --from=cloudflared /usr/local/bin/cloudflared /usr/local/bin/cloudflared
10
+
11
+ # 设置端口
12
+ EXPOSE 3210
13
+ ENV PORT=3210
14
+
15
+ # 使用 node 作为基础镜像的启动命令
16
+ CMD cloudflared tunnel --no-autoupdate run --token $CF_TOKEN & node server.js