asemxin commited on
Commit
96928b2
·
1 Parent(s): 622794b

Fix: add auth-dir config and create directory

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -31,9 +31,13 @@ COPY --from=builder /app/config.example.yaml /CLIProxyAPI/config.example.yaml
31
  WORKDIR /CLIProxyAPI
32
 
33
  # Create config file with port 7860 for HF Spaces
 
 
 
34
  RUN echo 'host: "0.0.0.0"' > /CLIProxyAPI/config.yaml && \
35
  echo 'port: 7860' >> /CLIProxyAPI/config.yaml && \
36
  echo 'debug: false' >> /CLIProxyAPI/config.yaml && \
 
37
  echo 'api-keys:' >> /CLIProxyAPI/config.yaml && \
38
  echo ' - "default-key"' >> /CLIProxyAPI/config.yaml && \
39
  chown user:user /CLIProxyAPI/config.yaml
 
31
  WORKDIR /CLIProxyAPI
32
 
33
  # Create config file with port 7860 for HF Spaces
34
+ # Create auth directory for user
35
+ RUN mkdir -p /home/user/.cli-proxy-api && chown -R user:user /home/user/.cli-proxy-api
36
+
37
  RUN echo 'host: "0.0.0.0"' > /CLIProxyAPI/config.yaml && \
38
  echo 'port: 7860' >> /CLIProxyAPI/config.yaml && \
39
  echo 'debug: false' >> /CLIProxyAPI/config.yaml && \
40
+ echo 'auth-dir: "/home/user/.cli-proxy-api"' >> /CLIProxyAPI/config.yaml && \
41
  echo 'api-keys:' >> /CLIProxyAPI/config.yaml && \
42
  echo ' - "default-key"' >> /CLIProxyAPI/config.yaml && \
43
  chown user:user /CLIProxyAPI/config.yaml