fix(render): pass password from env var to gateway command
This commit is contained in:
parent
9eaaa2b0d0
commit
453e40d25f
@ -1,11 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Render startup script - creates config and starts gateway
|
# Render startup script - creates config and starts gateway
|
||||||
|
set -e
|
||||||
|
|
||||||
# Create config directory
|
# Create config directory
|
||||||
mkdir -p /data/.clawdbot
|
mkdir -p "$CLAWDBOT_STATE_DIR"
|
||||||
|
|
||||||
# Write config file with Render-specific settings
|
# Write config file with Render-specific settings
|
||||||
cat > /data/.clawdbot/clawdbot.json << 'EOF'
|
cat > "$CLAWDBOT_STATE_DIR/clawdbot.json" << 'EOF'
|
||||||
{
|
{
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"trustedProxies": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"],
|
"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
|
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 \
|
exec node dist/index.js gateway \
|
||||||
--port 8080 \
|
--port 8080 \
|
||||||
--bind lan \
|
--bind lan \
|
||||||
--auth password \
|
--auth password \
|
||||||
|
--password "$CLAWDBOT_GATEWAY_PASSWORD" \
|
||||||
--allow-unconfigured
|
--allow-unconfigured
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user