Files
crossdesk-web-client/Dockerfile
yexuejc f641547d32 feat(web-client): 添加连接按钮状态检查和Docker部署支持
- 实现checkConnectButtonEnabled函数检查远程设备ID和密码是否有效
- 在服务器配置可见时验证信令服务器和STUN/TURN服务器输入
- 添加WebSocket连接初始化功能,延迟页面加载时的自动连接
- 为服务器配置输入框和传输ID/密码添加输入事件监听器
- 在断开连接时正确关闭WebSocket连接
- 添加Dockerfile支持容器化部署
- 更新连接逻辑以在WebSocket打开后才执行连接流程
2026-03-04 21:20:51 +08:00

28 lines
763 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 使用官方 nginx 镜像作为基础镜像
FROM nginx:alpine
# 复制网站文件到 nginx 的 html 目录
COPY index.html /usr/share/nginx/html/
COPY styles.css /usr/share/nginx/html/
COPY control.js /usr/share/nginx/html/
COPY web_client.js /usr/share/nginx/html/
COPY manifest.json /usr/share/nginx/html/
COPY CNAME /usr/share/nginx/html/
# 复制图标文件夹(如果存在)
COPY icons /usr/share/nginx/html/icons 2>/dev/null || true
# 复制 favicon如果存在
COPY favicon.ico /usr/share/nginx/html/ 2>/dev/null || true
# 暴露 80 端口
EXPOSE 80
# 启动 nginx
CMD ["nginx", "-g", "daemon off;"]
## 构建镜像
#docker build -t crossdesk-web-client .
## 运行容器
#docker run -d -p 38532:80 --name crossdesk crossdesk-web-client