ole2242527 commited on
Commit
64fa5b0
·
verified ·
1 Parent(s): 69c1dc2

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -4
Dockerfile CHANGED
@@ -2,15 +2,32 @@ FROM weishaw/sub2api:latest
2
 
3
  USER root
4
 
5
- RUN apk add --no-cache redis postgresql postgresql-client openssl tzdata su-exec python3 py3-bcrypt && mv /app/sub2api /app/hub-gateway && chmod +x /app/hub-gateway && mkdir -p /tmp/gateway-data /tmp/gateway-redis /tmp/gateway-postgres && chown -R sub2api:sub2api /tmp/gateway-data /tmp/gateway-redis && chown -R postgres:postgres /tmp/gateway-postgres
 
 
 
 
 
 
 
 
6
 
7
- ENV DATA_DIR=/tmp/gateway-data SERVER_HOST=0.0.0.0 SERVER_PORT=7860 PORT=7860 SERVER_MODE=release GIN_MODE=release AUTO_SETUP=true DATABASE_SSLMODE=require TZ=Asia/Shanghai
 
 
 
 
 
 
 
 
8
 
9
  COPY start-space.sh /app/start-space.sh
10
- RUN chmod +x /app/start-space.sh
11
 
12
  EXPOSE 7860
13
 
14
- HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 CMD wget -q -T 5 -O /dev/null http://localhost:7860/health || exit 1
 
15
 
16
  ENTRYPOINT ["/app/start-space.sh"]
 
2
 
3
  USER root
4
 
5
+ RUN apk add --no-cache redis postgresql postgresql-client openssl tzdata su-exec python3 py3-bcrypt \
6
+ && mv /app/sub2api /app/hub-gateway \
7
+ && chmod +x /app/hub-gateway \
8
+ && mkdir -p /data/gateway-data /data/gateway-redis /data/gateway-postgres \
9
+ && chown -R sub2api:sub2api /data/gateway-data /data/gateway-redis \
10
+ && chown -R postgres:postgres /data/gateway-postgres \
11
+ && mkdir -p /tmp/gateway-data /tmp/gateway-redis /tmp/gateway-postgres \
12
+ && chown -R sub2api:sub2api /tmp/gateway-data /tmp/gateway-redis \
13
+ && chown -R postgres:postgres /tmp/gateway-postgres
14
 
15
+ ENV DATA_DIR=/data/gateway-data \
16
+ SERVER_HOST=0.0.0.0 \
17
+ SERVER_PORT=7860 \
18
+ PORT=7860 \
19
+ SERVER_MODE=release \
20
+ GIN_MODE=release \
21
+ AUTO_SETUP=true \
22
+ DATABASE_SSLMODE=require \
23
+ TZ=Asia/Shanghai
24
 
25
  COPY start-space.sh /app/start-space.sh
26
+ RUN chmod +x /app/start-space.sh && sed -i 's/\r$//' /app/start-space.sh
27
 
28
  EXPOSE 7860
29
 
30
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
31
+ CMD wget -q -T 5 -O /dev/null http://localhost:${SERVER_PORT:-7860}/health || exit 1
32
 
33
  ENTRYPOINT ["/app/start-space.sh"]