fix(docker): let searxng boot when the settings migration fails

The migration runs under `set -eu`, so any settings file it cannot parse or
rewrite took the container down instead of merely going unmigrated. A symlinked
/etc/searxng/settings.yml is enough: the migration refuses a non-regular file
and searxng, which reads through the symlink perfectly well, never got to start.

Guard the call with `|| true` in all three Compose variants. The failure still
prints its reason on stderr, and searxng is left to report anything genuinely
wrong with the file.
This commit is contained in:
Léo
2026-08-16 04:06:38 +02:00
parent 54d794e8de
commit bec4d1805d
4 changed files with 16 additions and 4 deletions
+4 -1
View File
@@ -310,9 +310,12 @@ def test_replace_failure_preserves_original_and_removes_temporary_file(
def test_compose_runs_migration_for_all_variants(compose_file):
text = compose_file.read_text(encoding="utf-8")
# The `|| true` is load-bearing: the entrypoint runs under `set -eu`, so
# without it a settings file the migration cannot parse or rewrite stops
# searxng from starting at all instead of merely going unmigrated.
assert (
"/usr/local/searxng/.venv/bin/python /tmp/migrate-searxng-settings.py "
"/etc/searxng/settings.yml" in text
"/etc/searxng/settings.yml || true" in text
)
assert (
"./scripts/migrate_searxng_settings.py:"