PHhTTPS commited on
Commit
7adf1d0
·
1 Parent(s): 7496446

fix: use printf instead of echo for startup script

Browse files
Files changed (5) hide show
  1. Dockerfile +7 -8
  2. deploy_hf.sh +4 -0
  3. restore_proxy.sh +4 -0
  4. server.log +0 -0
  5. sync_proxy.sh +4 -0
Dockerfile CHANGED
@@ -37,14 +37,13 @@ WORKDIR /app
37
  RUN mkdir -p /app/auth && chmod 777 /app/auth
38
 
39
  # Create a robust startup script
40
- RUN echo "#!/bin/bash" > /start.sh && \
41
- echo "set -e" >> /start.sh && \
42
- echo "--- STARTUP: Fixing Config ---" >> /start.sh && \
43
- echo "sed -i 's/freeapis-proxy:5001/localhost:5001/g' /etc/cliproxy/config.yaml" >> /start.sh && \
44
- echo "--- STARTUP: Launching FreeAPIs (Background) ---" >> /start.sh && \
45
- echo "cd /app/freeapis-proxy && PORT=5001 python3 server.py > /tmp/freeapis.log 2>&1 &" >> /start.sh && \
46
- echo "--- STARTUP: Launching Go Proxy (Foreground) ---" >> /start.sh && \
47
- echo "exec /usr/local/bin/cliproxy -config /etc/cliproxy/config.yaml -port 7860" >> /start.sh && \
48
  chmod +x /start.sh
49
 
50
  EXPOSE 7860
 
37
  RUN mkdir -p /app/auth && chmod 777 /app/auth
38
 
39
  # Create a robust startup script
40
+ RUN printf '#!/bin/bash\nset -e\n' > /start.sh && \
41
+ printf 'echo "=== STARTUP: Fixing Config ==="\n' >> /start.sh && \
42
+ printf 'sed -i "s/freeapis-proxy:5001/localhost:5001/g" /etc/cliproxy/config.yaml\n' >> /start.sh && \
43
+ printf 'echo "=== STARTUP: Launching FreeAPIs (Background) ==="\n' >> /start.sh && \
44
+ printf 'cd /app/freeapis-proxy && PORT=5001 python3 server.py > /tmp/freeapis.log 2>&1 &\n' >> /start.sh && \
45
+ printf 'echo "=== STARTUP: Launching Go Proxy (Foreground) ==="\n' >> /start.sh && \
46
+ printf 'exec /usr/local/bin/cliproxy -config /etc/cliproxy/config.yaml -port 7860\n' >> /start.sh && \
 
47
  chmod +x /start.sh
48
 
49
  EXPOSE 7860
deploy_hf.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/bash
2
+ git add Dockerfile config.yaml static/status.html internal/api/modules/freeapis/freeapis.go
3
+ git commit -m "Final Stack: Go Proxy on 7860"
4
+ git push socializer HEAD:main --force
restore_proxy.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/bash
2
+ git add freeapis-proxy/
3
+ git commit -m "Fix: Restore missing freeapis-proxy files"
4
+ git push socializer HEAD:main --force
server.log DELETED
The diff for this file is too large to render. See raw diff
 
sync_proxy.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/bash
2
+ git add -f freeapis-proxy/ static/management.html
3
+ git commit --allow-empty -m "Fix: Ensure freeapis-proxy and status page are synced"
4
+ git push socializer HEAD:main --force