File size: 838 Bytes
18606b2 5e69c48 18606b2 d21f842 b901c0a 18606b2 c1cf421 e77c135 18606b2 c1cf421 18606b2 5e69c48 803121e d21f842 e77c135 5e69c48 b901c0a 8a72596 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
# 安装必要的依赖
RUN apt-get update && apt-get install -y \
wget \
curl \
unzip \
grep \
&& rm -rf /var/lib/apt/lists/*
# 设置环境变量,可以根据需要修改
ENV NZ_SITE_TITLE="我的哪吒监控"
# Hugging Face Spaces 默认使用 7860 端口
ENV NZ_PORT=7860
ENV NZ_HOSTPORT="xjfkkk-nezha.hf.space:443"
ENV NZ_TLS="true"
ENV NZ_LANG="zh_CN"
# 复制并运行脚本
COPY nezha.sh /nezha.sh
RUN chmod +x /nezha.sh
RUN /nezha.sh
# 确保 /data 目录具有写权限
RUN mkdir -p /data/nezha/dashboard/data && chmod -R 777 /data/nezha
# 暴露端口
EXPOSE 7860
# 设置启动命令,移除未定义的参数 -web
CMD ["/data/nezha/dashboard/app", "-c", "/data/nezha/dashboard/data/config.yaml", "-db", "/data/nezha/dashboard/data/sqlite.db"] |