Spaces:
Sleeping
Sleeping
epii-1
commited on
Commit
·
27c03c2
1
Parent(s):
84f6b5e
222222
Browse files- Dockerfile +15 -0
- README.md +1 -0
- nginx.conf +28 -0
Dockerfile
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# 使用官方的 Nginx 镜像
|
2 |
+
FROM nginx:stable-alpine
|
3 |
+
|
4 |
+
# 创建必要的目录并设置权限
|
5 |
+
RUN mkdir -p /var/cache/nginx/client_temp && \
|
6 |
+
chown -R nginx:nginx /var/cache/nginx
|
7 |
+
|
8 |
+
# 复制自定义的 Nginx 配置文件
|
9 |
+
COPY nginx.conf /etc/nginx/nginx.conf
|
10 |
+
|
11 |
+
# 设置工作目录
|
12 |
+
WORKDIR /usr/share/nginx/html
|
13 |
+
|
14 |
+
# 设置默认命令
|
15 |
+
CMD ["nginx", "-g", "daemon off;"]
|
README.md
CHANGED
@@ -5,6 +5,7 @@ colorFrom: green
|
|
5 |
colorTo: pink
|
6 |
sdk: docker
|
7 |
pinned: false
|
|
|
8 |
---
|
9 |
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
5 |
colorTo: pink
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
+
app_port: 7860
|
9 |
---
|
10 |
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
nginx.conf
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
worker_processes 1;
|
2 |
+
|
3 |
+
events {
|
4 |
+
worker_connections 1024;
|
5 |
+
}
|
6 |
+
|
7 |
+
http {
|
8 |
+
include mime.types;
|
9 |
+
default_type application/octet-stream;
|
10 |
+
|
11 |
+
sendfile on;
|
12 |
+
keepalive_timeout 65;
|
13 |
+
|
14 |
+
server {
|
15 |
+
listen 7860;
|
16 |
+
server_name localhost;
|
17 |
+
|
18 |
+
location / {
|
19 |
+
root /usr/share/nginx/html;
|
20 |
+
index index.html index.htm;
|
21 |
+
}
|
22 |
+
|
23 |
+
error_page 500 502 503 504 /50x.html;
|
24 |
+
location = /50x.html {
|
25 |
+
root /usr/share/nginx/html;
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|