Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearXNG: docker #383

Merged
merged 1 commit into from
Oct 21, 2021
Merged

SearXNG: docker #383

merged 1 commit into from
Oct 21, 2021

Conversation

dalf
Copy link
Member

@dalf dalf commented Oct 5, 2021

What does this PR do?

SearXNG brand: the docker image

  • installs the file in usr/local/searxng (inside the image)
  • uses searxng user
  • uses the volume /etc/searxng.

searx compatibility:

  • If /etc/searx/settings.yml exists, it is copied to /etc/searxng
  • If /etc/searx/uwsgi.ini exists, is it ignored (the content requires some updates)
  • If /etc/searx/settings.yml or /etc/searx/uwsgi.ini exist:
    • a warning is logged
    • the file /etc/searx/deprecated_volume_read_me.txt is created, and notice the administrator.

The documentation is updated accordingly.

Why is this change important?

See #358

How to test this PR locally?

Author's checklist

Related issues

@unixfox
Copy link
Member

unixfox commented Oct 12, 2021

I haven't had the time to test this PR but I guess the major test is to install a working Searx container then migrate to a searxng container and see if it still works.

@return42
Copy link
Member

  • If /etc/searx/settings.yml exists, it is copied to /etc/searxng

Related issue: #401

@dalf should we rebase this PR first .. to get #401 ?

@dalf
Copy link
Member Author

dalf commented Oct 12, 2021

@dalf should we rebase this PR first .. to get #401 ?

In the docker image, SearXNG uses /etc/searxng/settings.yml and falls back to /etc/searx/settings.yml.

But before the application starts, if /etc/searxng/settings.yml doesn't exist then it is copied from /usr/local/searxng/searx/settings.yml ( see dockerfiles/docker-entrypoint.sh ) So the fall back to /etc/searx/settings.yml never happens.

That's why, in this PR /etc/searx/settings.yml is copied to /etc/searxng/settings.yml, in addition /etc/searx/deprecated_volume_read_me.txt contains a warning.

The test is:

  • install https://github.com/searx/searx-docker
  • ./start.sh
  • ./stop.sh
  • change ./searx/settings.yml ( the instance name for example ).
  • change the docker image from searx/searx to searxng/searxng.
  • ./start.sh
  • check the instance name is still changed.
  • check there is ./searx/deprecated_volume_read_me.txt.

@dalf dalf requested review from return42 and removed request for unixfox October 12, 2021 18:35
@dalf
Copy link
Member Author

dalf commented Oct 21, 2021

It works on a new VM as expected with only one issue: in settings.yml, brand.new_issue_url is required, so SearXNG doesn't start. Once brand.new_issue_url is set, everything is okay.

@dalf dalf merged commit cec9ded into searxng:master Oct 21, 2021
@dalf dalf deleted the searxng-docker branch October 21, 2021 10:03
dalf added a commit to searxng/searxng-docker that referenced this pull request Nov 27, 2021
Update searxng-docker with searxng/searxng#383 changes.

Close #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants