asemxin commited on
Commit
e9c4828
·
1 Parent(s): f70be6f

Use HF persistent storage for auth data

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -36,14 +36,13 @@ COPY --from=builder /app/config.example.yaml /CLIProxyAPI/config.example.yaml
36
 
37
  WORKDIR /CLIProxyAPI
38
 
39
- # Create config file with port 7860 for HF Spaces
40
- # Create auth directory for user
41
- RUN mkdir -p /home/user/.cli-proxy-api && chown -R user:user /home/user/.cli-proxy-api
42
 
43
  RUN echo 'host: "0.0.0.0"' > /CLIProxyAPI/config.yaml && \
44
  echo 'port: 7860' >> /CLIProxyAPI/config.yaml && \
45
  echo 'debug: false' >> /CLIProxyAPI/config.yaml && \
46
- echo 'auth-dir: "/home/user/.cli-proxy-api"' >> /CLIProxyAPI/config.yaml && \
47
  echo 'remote-management:' >> /CLIProxyAPI/config.yaml && \
48
  echo ' allow-remote: true' >> /CLIProxyAPI/config.yaml && \
49
  echo ' disable-control-panel: false' >> /CLIProxyAPI/config.yaml && \
 
36
 
37
  WORKDIR /CLIProxyAPI
38
 
39
+ # Create auth directory in persistent storage
40
+ RUN mkdir -p /data/.cli-proxy-api && chown -R user:user /data/.cli-proxy-api
 
41
 
42
  RUN echo 'host: "0.0.0.0"' > /CLIProxyAPI/config.yaml && \
43
  echo 'port: 7860' >> /CLIProxyAPI/config.yaml && \
44
  echo 'debug: false' >> /CLIProxyAPI/config.yaml && \
45
+ echo 'auth-dir: "/data/.cli-proxy-api"' >> /CLIProxyAPI/config.yaml && \
46
  echo 'remote-management:' >> /CLIProxyAPI/config.yaml && \
47
  echo ' allow-remote: true' >> /CLIProxyAPI/config.yaml && \
48
  echo ' disable-control-panel: false' >> /CLIProxyAPI/config.yaml && \