Murasame52 commited on
Commit
876ae09
·
verified ·
1 Parent(s): f5a618e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -3,17 +3,18 @@
3
  # =============================================================================
4
  FROM ghcr.io/wei-shaw/sub2api:latest
5
 
6
- # 安装所有必要工具(包 PostgreSQL 服务端
7
  RUN apk add --no-cache \
8
  python3 \
9
  py3-bcrypt \
10
  redis \
11
  postgresql-client \
12
- postgresql-server \
13
  postgresql-contrib \
14
  openssl \
15
  tzdata \
16
- su-exec
 
17
 
18
  # 创建软链接,让脚本中的 /app/hub-gateway 指向实际的 /app/sub2api
19
  RUN ln -s /app/sub2api /app/hub-gateway
@@ -30,7 +31,7 @@ ENV SERVER_PORT=7860 \
30
  POSTGRES_DB=sub2api \
31
  POSTGRES_PASSWORD=changeme
32
 
33
- # 健康检查(依赖 wget,基础镜像通常内置
34
  HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
35
  CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-7860}/health || exit 1
36
 
 
3
  # =============================================================================
4
  FROM ghcr.io/wei-shaw/sub2api:latest
5
 
6
+ # 安装所有必要工具(修正名:postgresql-server postgresql
7
  RUN apk add --no-cache \
8
  python3 \
9
  py3-bcrypt \
10
  redis \
11
  postgresql-client \
12
+ postgresql \
13
  postgresql-contrib \
14
  openssl \
15
  tzdata \
16
+ su-exec \
17
+ wget # 用于健康检查,若基础镜像已有可删除
18
 
19
  # 创建软链接,让脚本中的 /app/hub-gateway 指向实际的 /app/sub2api
20
  RUN ln -s /app/sub2api /app/hub-gateway
 
31
  POSTGRES_DB=sub2api \
32
  POSTGRES_PASSWORD=changeme
33
 
34
+ # 健康检查(依赖 wget,安装
35
  HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
36
  CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-7860}/health || exit 1
37