mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-03 05:22:20 +02:00
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:
@@ -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:"
|
||||
|
||||
Reference in New Issue
Block a user