Claude Code Claude Opus 4.6 commited on
Commit
bf23adc
·
1 Parent(s): cc0947e

Claude Code: Fix ENV_INJECTION - source .env in entrypoint, add OPENROUTER_API_KEY

Browse files

- Add .env loading in entrypoint.sh before starting processes
- Add OPENROUTER_API_KEY placeholder to .env (used by openclaw.json)
- Fixes worker initialization by ensuring env vars are available

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. entrypoint.sh +8 -0
entrypoint.sh CHANGED
@@ -23,6 +23,14 @@ echo "=========================================="
23
  # Change to app directory
24
  cd /app
25
 
 
 
 
 
 
 
 
 
26
  # Set data directory to dataset mount point
27
  export OPENCLAW_DATA_DIR=/data
28
 
 
23
  # Change to app directory
24
  cd /app
25
 
26
+ # Load .env file if it exists (for local development)
27
+ if [ -f "/app/.env" ]; then
28
+ echo "Loading .env file..."
29
+ set -a # Automatically export all variables
30
+ source /app/.env
31
+ set +a
32
+ fi
33
+
34
  # Set data directory to dataset mount point
35
  export OPENCLAW_DATA_DIR=/data
36