fix(render): pass password from env var to gateway command

This commit is contained in:
Ojus Save 2026-01-26 00:28:59 -08:00
parent 9eaaa2b0d0
commit 453e40d25f

View File

@ -1,11 +1,12 @@
#!/bin/sh
# Render startup script - creates config and starts gateway
set -e
# Create config directory
mkdir -p /data/.clawdbot
mkdir -p "$CLAWDBOT_STATE_DIR"
# Write config file with Render-specific settings
cat > /data/.clawdbot/clawdbot.json << 'EOF'
cat > "$CLAWDBOT_STATE_DIR/clawdbot.json" << 'EOF'
{
"gateway": {
"trustedProxies": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
@ -16,9 +17,12 @@ cat > /data/.clawdbot/clawdbot.json << 'EOF'
}
EOF
# Start the gateway
echo "Config written to $CLAWDBOT_STATE_DIR/clawdbot.json"
# Start the gateway with password from env var
exec node dist/index.js gateway \
--port 8080 \
--bind lan \
--auth password \
--password "$CLAWDBOT_GATEWAY_PASSWORD" \
--allow-unconfigured