XJFKKK commited on
Commit
b901c0a
·
verified ·
1 Parent(s): 03ad329

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -9
Dockerfile CHANGED
@@ -2,26 +2,22 @@ FROM ubuntu:20.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
- # 安装必要的依赖,包括 openssl
6
  RUN apt-get update && apt-get install -y \
7
  wget \
8
  curl \
9
  unzip \
10
  grep \
11
- openssl \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # 设置环境变量,可以根据需要修改
15
  ENV NZ_SITE_TITLE="我的哪吒监控"
16
  # Hugging Face Spaces 默认使用 7860 端口
17
  ENV NZ_PORT=7860
18
- # ENV NZ_HOSTPORT="example.com:443" # 如果不需要,可以删除此行
19
  ENV NZ_TLS="true"
20
  ENV NZ_LANG="zh_CN"
21
 
22
- # 设置您的 Hugging Face Space 名称,请替换为您的 Space 名称
23
- ENV NZ_SPACE_NAME="nezha"
24
-
25
  # 复制并运行脚本
26
  COPY nezha.sh /nezha.sh
27
  RUN chmod +x /nezha.sh
@@ -31,8 +27,7 @@ RUN /nezha.sh
31
  RUN mkdir -p /data/nezha/dashboard/data && chmod -R 777 /data/nezha
32
 
33
  # 暴露端口
34
- EXPOSE 7860
35
- EXPOSE 5555
36
 
37
- # 设置启动命令
38
  CMD ["/data/nezha/dashboard/app", "-c", "/data/nezha/dashboard/data/config.yaml", "-db", "/data/nezha/dashboard/data/sqlite.db"]
 
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
+ # 安装必要的依赖
6
  RUN apt-get update && apt-get install -y \
7
  wget \
8
  curl \
9
  unzip \
10
  grep \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # 设置环境变量,可以根据需要修改
14
  ENV NZ_SITE_TITLE="我的哪吒监控"
15
  # Hugging Face Spaces 默认使用 7860 端口
16
  ENV NZ_PORT=7860
17
+ ENV NZ_HOSTPORT="xjfkkk-nezha.hf.space:5555"
18
  ENV NZ_TLS="true"
19
  ENV NZ_LANG="zh_CN"
20
 
 
 
 
21
  # 复制并运行脚本
22
  COPY nezha.sh /nezha.sh
23
  RUN chmod +x /nezha.sh
 
27
  RUN mkdir -p /data/nezha/dashboard/data && chmod -R 777 /data/nezha
28
 
29
  # 暴露端口
30
+ EXPOSE 7860 5555
 
31
 
32
+ # 设置启动命令,移除未定义的参数 -web
33
  CMD ["/data/nezha/dashboard/app", "-c", "/data/nezha/dashboard/data/config.yaml", "-db", "/data/nezha/dashboard/data/sqlite.db"]