Spaces:
Sleeping
Sleeping
Fix: Usar heredoc correctamente para config
Browse files- Dockerfile +34 -3
Dockerfile
CHANGED
|
@@ -12,9 +12,40 @@ ENV PORT=7860 \
|
|
| 12 |
|
| 13 |
RUN mkdir -p /root/.openclaw/sessions
|
| 14 |
|
| 15 |
-
RUN
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
EXPOSE 7860
|
| 20 |
|
|
|
|
| 12 |
|
| 13 |
RUN mkdir -p /root/.openclaw/sessions
|
| 14 |
|
| 15 |
+
RUN cat > /usr/local/bin/setup.sh << 'SETUPSCRIPT'
|
| 16 |
+
#!/bin/bash
|
| 17 |
+
set -e
|
| 18 |
+
|
| 19 |
+
cat > /root/.openclaw/openclaw.json << 'EOF'
|
| 20 |
+
{
|
| 21 |
+
"models": {
|
| 22 |
+
"providers": {
|
| 23 |
+
"9router": {
|
| 24 |
+
"baseUrl": "https://rraiir8.9router.com/v1",
|
| 25 |
+
"apiKey": "sk-f773b5beecaa4c15-9c7byl-7290844a",
|
| 26 |
+
"api": "openai-completions",
|
| 27 |
+
"models": [{"id": "combo/free-combo", "name": "Kimi Combo (9Router)", "contextWindow": 128000}]
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"agents": {"defaults": {"model": {"primary": "9router/combo/free-combo"}}},
|
| 32 |
+
"channels": {"telegram": {"type": "telegram", "botToken": "", "enabled": false}},
|
| 33 |
+
"gateway": {
|
| 34 |
+
"mode": "local",
|
| 35 |
+
"bind": "lan",
|
| 36 |
+
"port": 7860,
|
| 37 |
+
"trustedProxies": ["0.0.0.0/0", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
|
| 38 |
+
"auth": {"mode": "token", "token": "CHANGE_ME"},
|
| 39 |
+
"controlUi": {"allowInsecureAuth": true, "dangerouslyAllowHostHeaderOriginFallback": true}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
EOF
|
| 43 |
+
|
| 44 |
+
echo "Config created"
|
| 45 |
+
cat /root/.openclaw/openclaw.json
|
| 46 |
+
SETUPSCRIPT
|
| 47 |
+
|
| 48 |
+
RUN chmod +x /usr/local/bin/setup.sh && /usr/local/bin/setup.sh
|
| 49 |
|
| 50 |
EXPOSE 7860
|
| 51 |
|