kidpro2002 commited on
Commit
8720004
·
verified ·
1 Parent(s): 4b33a31

Fix: Valores por defecto

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -16,26 +16,31 @@ 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
  "custom": {
24
- "baseUrl": "${OPENCLAW_BASE_URL}",
25
- "apiKey": "${OPENCLAW_API_KEY}",
26
  "api": "openai-completions",
27
- "models": [{"id": "${OPENCLAW_MODEL}", "name": "Custom Model", "contextWindow": 128000}]
28
  }
29
  }
30
  },
31
- "agents": {"defaults": {"model": {"primary": "custom/${OPENCLAW_MODEL}"}}},
32
  "channels": {"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": "${OPENCLAW_GATEWAY_PASSWORD}"},
39
  "controlUi": {"allowInsecureAuth": true, "dangerouslyAllowHostHeaderOriginFallback": true, "dangerouslyDisableDeviceAuth": true}
40
  }
41
  }
 
16
  #!/bin/bash
17
  set -e
18
 
19
+ BASE_URL="${OPENCLAW_BASE_URL:-https://api.openrouter.ai/v1}"
20
+ API_KEY="${OPENCLAW_API_KEY:-}"
21
+ MODEL="${OPENCLAW_MODEL:-anthropic/claude-3-haiku}"
22
+ PASSWORD="${OPENCLAW_GATEWAY_PASSWORD:-openclaw123}"
23
+
24
  cat > /root/.openclaw/openclaw.json << EOF
25
  {
26
  "models": {
27
  "providers": {
28
  "custom": {
29
+ "baseUrl": "${BASE_URL}",
30
+ "apiKey": "${API_KEY}",
31
  "api": "openai-completions",
32
+ "models": [{"id": "${MODEL}", "name": "Custom Model", "contextWindow": 128000}]
33
  }
34
  }
35
  },
36
+ "agents": {"defaults": {"model": {"primary": "custom/${MODEL}"}}},
37
  "channels": {"telegram": {"botToken": "", "enabled": false}},
38
  "gateway": {
39
  "mode": "local",
40
  "bind": "lan",
41
  "port": 7860,
42
  "trustedProxies": ["0.0.0.0/0", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
43
+ "auth": {"mode": "token", "token": "${PASSWORD}"},
44
  "controlUi": {"allowInsecureAuth": true, "dangerouslyAllowHostHeaderOriginFallback": true, "dangerouslyDisableDeviceAuth": true}
45
  }
46
  }