orztv
commited on
Commit
·
e412af3
1
Parent(s):
026e3a8
update
Browse files
README.md
CHANGED
@@ -8,3 +8,37 @@ pinned: false
|
|
8 |
---
|
9 |
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
---
|
9 |
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
11 |
+
|
12 |
+
这个项目使用 Docker 来运行 Python Flask 和 Node.js 示例程序,并使用 Nginx 进行反向代理。
|
13 |
+
|
14 |
+
## 环境要求
|
15 |
+
|
16 |
+
- Docker
|
17 |
+
|
18 |
+
## 使用方法
|
19 |
+
|
20 |
+
1. 构建 Docker 镜像:
|
21 |
+
```
|
22 |
+
docker build -t hf-proxy .
|
23 |
+
```
|
24 |
+
|
25 |
+
2. 运行 Docker 容器:
|
26 |
+
```
|
27 |
+
docker run -p 7860:7860 hf-proxy
|
28 |
+
```
|
29 |
+
|
30 |
+
3. 访问应用:
|
31 |
+
- Flask 应用: http://localhost:7860/flask
|
32 |
+
- Node.js 应用: http://localhost:7860/node
|
33 |
+
|
34 |
+
## 注意事项
|
35 |
+
|
36 |
+
- 默认用户为 appuser (非 root)
|
37 |
+
- Flask 应用运行在容器内部的 6000 端口
|
38 |
+
- Node.js 应用运行在容器内部的 7000 端口
|
39 |
+
- Nginx 反向代理运行在 7860 端口
|
40 |
+
|
41 |
+
## 健康检查
|
42 |
+
|
43 |
+
- Flask 健康检查: http://localhost:7860/flask/health
|
44 |
+
- Node.js 健康检查: http://localhost:7860/node/health
|