Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
# FROM lobehub/lobe-chat:v0.99.1
|
2 |
# 使用 multi-stage build
|
3 |
FROM cloudflare/cloudflared:latest as cloudflared
|
4 |
|
5 |
FROM node:20-slim as runner
|
6 |
WORKDIR /app
|
7 |
-
|
|
|
|
|
8 |
COPY --from=cloudflared /usr/local/bin/cloudflared /usr/local/bin/cloudflared
|
9 |
|
10 |
# 设置端口
|
@@ -12,4 +13,4 @@ EXPOSE 3210
|
|
12 |
ENV PORT=3210
|
13 |
|
14 |
# 使用 node 作为基础镜像的启动命令
|
15 |
-
CMD cloudflared tunnel --no-autoupdate run --token $CF_TOKEN & node
|
|
|
|
|
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 |
# 设置端口
|
|
|
13 |
ENV PORT=3210
|
14 |
|
15 |
# 使用 node 作为基础镜像的启动命令
|
16 |
+
CMD cloudflared tunnel --no-autoupdate run --token $CF_TOKEN & node server.js
|