Simford.Dong commited on
Commit
a1b1db8
·
1 Parent(s): d774444

Fix: force overwrite auth-profiles.json on startup

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -32,16 +32,16 @@ mkdir -p /root/.openclaw/agents/main/sessions\n\
32
  mkdir -p /root/.openclaw/credentials\n\
33
  \n\
34
  # Generate auth-profiles.json for the main agent\n\
35
- if [ ! -f /root/.openclaw/agents/main/agent/auth-profiles.json ]; then\n\
36
- echo "Generating auth-profiles.json..."\n\
37
- \n\
38
- # Construct the JSON content with correct structure\n\
39
- JSON_CONTENT="{\n\
40
- \"auth\": {\n\
41
- \"profiles\": {\n\
42
- \"gemini-default\": {\n\
43
- \"provider\": \"google\",\n\
44
- \"apiKey\": \"${GEMINI_API_KEY_1}\",\n"\n\
45
  \n\
46
  if [ -n "$OPENCLAW_GEMINI_BASE_URL" ]; then\n\
47
  JSON_CONTENT="${JSON_CONTENT} \"baseUrl\": \"${OPENCLAW_GEMINI_BASE_URL}\",\n"\n\
 
32
  mkdir -p /root/.openclaw/credentials\n\
33
  \n\
34
  # Generate auth-profiles.json for the main agent\n\
35
+ # Always overwrite to ensure latest keys/config\n\
36
+ echo "Generating auth-profiles.json..."\n\
37
+ \n\
38
+ # Construct the JSON content with correct structure\n\
39
+ JSON_CONTENT="{\n\
40
+ \"auth\": {\n\
41
+ \"profiles\": {\n\
42
+ \"gemini-default\": {\n\
43
+ \"provider\": \"google\",\n\
44
+ \"apiKey\": \"${GEMINI_API_KEY_1}\",\n"\n\
45
  \n\
46
  if [ -n "$OPENCLAW_GEMINI_BASE_URL" ]; then\n\
47
  JSON_CONTENT="${JSON_CONTENT} \"baseUrl\": \"${OPENCLAW_GEMINI_BASE_URL}\",\n"\n\