feat: Add start-container.sh script for backend container orchestration.
This commit is contained in:
parent
c704aa8622
commit
da3020b4f1
@ -27,6 +27,35 @@ find "$FOXY_HOME" -type f \( -name "*.json" -o -name "*.yaml" -o -name "*.yml" \
|
|||||||
-exec sed -i 's/\/home\/openclaw/\/home\/foxy/g' {} + 2>/dev/null || true
|
-exec sed -i 's/\/home\/openclaw/\/home\/foxy/g' {} + 2>/dev/null || true
|
||||||
echo "✅ Path patching complete."
|
echo "✅ Path patching complete."
|
||||||
|
|
||||||
|
# ─── Ensure gateway config is Docker-ready ────────────────────────────────────
|
||||||
|
OCCONFIG="$FOXY_HOME/openclaw.json"
|
||||||
|
if [ -f "$OCCONFIG" ]; then
|
||||||
|
echo "🔧 Patching OpenClaw config for Docker (LAN bind + Control UI)..."
|
||||||
|
python3 -c "
|
||||||
|
import json, sys
|
||||||
|
|
||||||
|
path = sys.argv[1]
|
||||||
|
with open(path, 'r') as f:
|
||||||
|
cfg = json.load(f)
|
||||||
|
|
||||||
|
# Ensure gateway section exists
|
||||||
|
gw = cfg.setdefault('gateway', {})
|
||||||
|
gw['bind'] = 'lan'
|
||||||
|
gw['mode'] = 'local'
|
||||||
|
|
||||||
|
# Control UI: required when bind != loopback
|
||||||
|
ui = gw.setdefault('controlUi', {})
|
||||||
|
ui['dangerouslyAllowHostHeaderOriginFallback'] = True
|
||||||
|
|
||||||
|
with open(path, 'w') as f:
|
||||||
|
json.dump(cfg, f, indent=2)
|
||||||
|
|
||||||
|
print(' ✅ gateway.bind = lan')
|
||||||
|
print(' ✅ gateway.mode = local')
|
||||||
|
print(' ✅ gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback = true')
|
||||||
|
" "$OCCONFIG"
|
||||||
|
fi
|
||||||
|
|
||||||
# ─── Gateway startup ─────────────────────────────────────────────────────────
|
# ─── Gateway startup ─────────────────────────────────────────────────────────
|
||||||
if [ "$OPENCLAW_TYPE" = "standalone" ]; then
|
if [ "$OPENCLAW_TYPE" = "standalone" ]; then
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user