ao3rda commited on
Commit
adcc209
·
verified ·
1 Parent(s): 2ce969e

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +27 -0
  2. supervisord.conf +15 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用基础镜像
2
+ FROM hectorqin/reader
3
+
4
+ # 安装 supervisord 和其他必要的软件
5
+ RUN apk add -U supervisor curl bash && \
6
+ rm -rf /var/cache/apk/* && \
7
+ curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /app/cloudflared && chmod +x /app/cloudflared
8
+
9
+ # 复制 supervisord 配置文件
10
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
11
+
12
+ # 设置工作目录
13
+ WORKDIR /app
14
+
15
+ COPY . /app
16
+
17
+ # 设置权限
18
+ RUN chmod 777 /app/
19
+
20
+ # 设置时区
21
+ ENV TZ=Asia/Shanghai
22
+
23
+ # 暴露端口
24
+ EXPOSE 7860
25
+
26
+ # 启动 supervisord
27
+ CMD ["/usr/bin/supervisord"]
supervisord.conf ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [supervisord]
2
+ nodaemon=true
3
+
4
+ [program:yuedu3]
5
+ command=java -jar /app/bin/reader.jar --spring.profiles.active=prod --reader.server.port=7860 --reader.app.secure=true --reader.app.secureKey=Aa146934 --reader.app.inviteCode=reader3hf
6
+ autostart=true
7
+ autorestart=true
8
+ startsecs=0
9
+
10
+ [program:cfd]
11
+ command=/app/cloudflared tunnel --no-autoupdate run --token eyJhIjoiZjEyMjQ3MGExMWEwYjAxOTBiYWY3ZmRlNjUxY2NkMjMiLCJ0IjoiMTY1Mzc5ZjYtYzZlYy00Mzk4LTllYTktOWI2NWJiZjBmNzBiIiwicyI6Ill6WTRNalJrWWprdE5XSXdOeTAwTnpGbExXSTBabVl0TW1VMVlqTTRZelkyTkdRNCJ9
12
+ autostart=true
13
+ autorestart=true
14
+ startsecs=5
15
+ redirect_stderr=true