fix: google anti-bot flag + persistent/safe settings apply + TTS engine wiring

- Chrome: --disable-blink-features=AutomationControlled (+ ko-KR) so Google
  shows results, not the /sorry/ automation block.
- Settings persist to /data/jarvis-settings.json (survives recreate; entrypoint
  re-merges it) AND the runtime config; apply restarts via a DETACHED process so
  the HTTP response isn't dropped when the bridge restarts.
- Bridge reads tts_engine from the settings config so the TTS-engine choice
  actually applies.
This commit is contained in:
javis-bot
2026-06-15 13:13:11 +09:00
parent 84e435f916
commit 247edda3eb
4 changed files with 73 additions and 16 deletions

View File

@@ -47,6 +47,22 @@ chmod 600 /root/.vnc/passwd
# --- Render jarvis brain config from template ---
envsubst < /app/docker/jarvis-config.template.json > /app/config/jarvis.json
export JARVIS_CONFIG_PATH=/app/config/jarvis.json
# Merge persistent settings from the settings UI (on the /data volume) on top of
# the env-rendered config, so changes survive container recreate.
if [ -f /data/jarvis-settings.json ]; then
python3 - <<'PY' || true
import json
try:
base = json.load(open("/app/config/jarvis.json"))
ov = json.load(open("/data/jarvis-settings.json"))
if isinstance(base, dict) and isinstance(ov, dict):
base.update(ov)
json.dump(base, open("/app/config/jarvis.json", "w"), ensure_ascii=False, indent=2)
print("[entrypoint] merged persistent settings overrides")
except Exception as e:
print(f"[entrypoint] settings merge skipped: {e}")
PY
fi
# --- Ensure the Piper voice exists (best effort) ---
bash /app/docker/download-piper.sh || echo "[entrypoint] piper download failed; TTS may be unavailable"

View File

@@ -14,6 +14,9 @@ export DISPLAY=:1
exec google-chrome \
--no-sandbox --no-first-run --disable-dev-shm-usage \
--test-type \
--disable-blink-features=AutomationControlled \
--disable-features=AutomationControlled \
--lang=ko-KR \
--disable-infobars \
--no-default-browser-check \
--disable-translate \