Simford.Dong commited on
Commit ·
0a53576
1
Parent(s): 2ec340f
Fix: rename profile to google-default and add env fallback
Browse files- Dockerfile +10 -7
Dockerfile
CHANGED
|
@@ -35,13 +35,13 @@ mkdir -p /root/.openclaw/credentials\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 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
\n\
|
| 46 |
if [ -n "$OPENCLAW_GEMINI_BASE_URL" ]; then\n\
|
| 47 |
JSON_CONTENT="${JSON_CONTENT} \"baseUrl\": \"${OPENCLAW_GEMINI_BASE_URL}\",\n"\n\
|
|
@@ -59,6 +59,9 @@ JSON_CONTENT="{\n\
|
|
| 59 |
if [ ! -f /root/.openclaw/openclaw.json ]; then\n\
|
| 60 |
cat > /root/.openclaw/openclaw.json << EOF\n\
|
| 61 |
{\n\
|
|
|
|
|
|
|
|
|
|
| 62 |
"gateway": {\n\
|
| 63 |
"mode": "local",\n\
|
| 64 |
"bind": "lan",\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 |
+
\"google-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\
|
|
|
|
| 59 |
if [ ! -f /root/.openclaw/openclaw.json ]; then\n\
|
| 60 |
cat > /root/.openclaw/openclaw.json << EOF\n\
|
| 61 |
{\n\
|
| 62 |
+
"env": {\n\
|
| 63 |
+
"GOOGLE_API_KEY": "${GEMINI_API_KEY_1}"\n\
|
| 64 |
+
},\n\
|
| 65 |
"gateway": {\n\
|
| 66 |
"mode": "local",\n\
|
| 67 |
"bind": "lan",\n\
|