fix: use printf instead of echo for startup script
Browse files- Dockerfile +7 -8
- deploy_hf.sh +4 -0
- restore_proxy.sh +4 -0
- server.log +0 -0
- 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
|
| 41 |
-
echo "
|
| 42 |
-
|
| 43 |
-
echo "
|
| 44 |
-
|
| 45 |
-
echo "
|
| 46 |
-
|
| 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
|