FROM chipsman/uptime-kuma:latest # 安装 Node.js RUN apk update && \ apk add --no-cache nodejs npm git # 设置目录权限 RUN mkdir -p /app/data && chown -R node:node /app RUN npm install npm -g RUN adduser -D app USER root RUN apk --no-cache add curl supervisor # 创建 Supervisor 日志目录并设置权限 RUN mkdir -p /var/log/supervisor/ && \ chown -R app:app /var/log/supervisor/ # 创建 Supervisor 运行目录并设置权限 RUN mkdir -p /var/run/supervisor/ && \ chown -R app:app /var/run/supervisor/ USER root WORKDIR /home/app RUN curl -LO https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && \ chmod +x cloudflared-linux-amd64 && \ mv cloudflared-linux-amd64 /usr/local/bin/cloudflared COPY ../supervisor.conf /etc/supervisor/supervisord.conf COPY ../start.sh /usr/bin/start.sh USER node EXPOSE 3001 CMD ["node","server/server.js"]