这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@inetol
Copy link
Member

@inetol inetol commented May 20, 2025

The configuration in Granian is handled with ENVs, much more convenient and practical for updating. The settings have been tested for over two months in a production instance, being usable on small to somewhat large instances without having to modify anything.

It also removes the patch functions and ENVs abstraction from the entrypoint, this makes it possible to run the container with immutable configuration.

In some setups, It may be desired to have the volumes/files under a specific uid/gid (other than searxng:searxng), if the entrypoint has root permissions it will chown automatically on every start, which may not be desired. Explicitly setting the new ENV FORCE_OWNERSHIP=false will prevent ownership from being modified.

Those changes are reflected in the documentation, which also received a rework.

No manual migration is necessary unless the user has changed the default uWSGI configuration or has a very specific setup.

Closes #4894
Closes #4818
Closes #4802

Supersedes #4596

Related #4479


Latest CI: https://github.com/inetol/searxng/actions/runs/15582123713

@return42
Copy link
Member

FYI: I changed Closes #4479 to Related #4479 ..

Docker users often forget: "there is life outside the container" ;-) .. we have shell scripts and documentation ..


sorry if I insist: in commit messages, I often miss the reference which is only given in the PR intro message. If a commit, for example, has a reference to a proposal or an issue, then this reference should also be included in the commit message.

Please read the description of [optional trailers] again carefully; there are links to a few commits below as examples ..

Basically, the commit message should contain all the information that the PR intro comment also has.

Since the commit message always exists before the PR, I always write everything in the commit message and then simply copy this message into the PR (GH already copies the commit message when creating the PR).

@inetol
Copy link
Member Author

inetol commented May 21, 2025

Docker users often forget: "there is life outside the container" ;-) .. we have shell scripts and documentation ..

I'm not saying no, I'm now updating the docs and adding the new Granian section, but the scripts? Wouldn't it be more prudent to first test migrating the container users and then providing in another PR the migration for the rest of those who decide to do the normal installation route?

I can convert this PR to migrate the whole stack to Granian including all installation routes, but I'm afraid it's going to be quite a big change.

@inetol inetol marked this pull request as draft May 21, 2025 06:48
@return42
Copy link
Member

I can convert this PR to migrate the whole stack to Granian including all installation routes, but I'm afraid it's going to be quite a big change.

No, this was not my intention .. these are different tasks and the scope of this PR is docker .. nothing more .. I just wanted to say "we can't close the feature request #4479 before all tasks are done" .. sorry if I was unclear.

@inetol
Copy link
Member Author

inetol commented Jun 3, 2025

Regarding #4891 (comment) ... This is the first revision of the documentation, can you check if it's OK, or should I modify something?

@inetol
Copy link
Member Author

inetol commented Jun 6, 2025

Rebases on master to fix merge conflicts, no changes were made.

Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome, can't wait to use it on my instance :)

I've left some small comments about the configuration, the general changes structure looks good to me though :)

inetol added a commit to inetol/searxng that referenced this pull request Jun 8, 2025
@Bnyro Bnyro mentioned this pull request Jun 8, 2025
inetol added a commit to inetol/searxng that referenced this pull request Jun 11, 2025
inetol added a commit to inetol/searxng that referenced this pull request Jun 11, 2025
inetol added a commit to inetol/searxng that referenced this pull request Jun 11, 2025
inetol added a commit to inetol/searxng that referenced this pull request Jun 11, 2025
@inetol inetol marked this pull request as ready for review June 13, 2025 12:32
@inetol inetol requested a review from Bnyro June 13, 2025 12:34
inetol added a commit to inetol/searxng that referenced this pull request Jun 27, 2025
@inetol
Copy link
Member Author

inetol commented Jun 27, 2025

Rebases on master to fix merge conflicts, no changes were made.

inetol added 2 commits June 28, 2025 20:31
The configuration in Granian is handled with ENVs, much more convenient and practical for updating. The settings have been tested for over two months in a production instance, being usable on small to somewhat large instances without having to modify anything.

It also removes the patch functions and ENVs abstraction from the entrypoint, this makes it possible to run the container with immutable configuration.

In some setups, It may be desired to have the volumes/files under a specific uid/gid (other than searxng:searxng), if the entrypoint has root permissions it will chown automatically on every start, which may not be desired. Explicitly setting the new ENV `FORCE_OWNERSHIP=false` will prevent ownership from being modified.

No manual migration is necessary **unless** the user has changed the default uWSGI configuration or has a very specific setup.

Closes searxng#4894
Closes searxng#4818
Closes searxng#4802

Supersedes searxng#4596

Related searxng#4479
All container documentation has been recreated.

A new documentation page has been created for Granian.
inetol added a commit to inetol/searxng that referenced this pull request Jun 28, 2025
Copy link
Member

@return42 return42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks awesome 👍 .. I placed a WIP commit on top, we can squash before merge this PR .. In the WIP commit there are only minor changes to the documentation .. no significant changes.

@return42
Copy link
Member

return42 commented Jul 4, 2025

@inetol your last force push removes some (small) modifications from my WIP commit, see docs/admin/installation-granian.rst .. these are only nits, but why did you removed them?

@inetol
Copy link
Member Author

inetol commented Jul 4, 2025

your last force push removes some (small) modifications from my WIP commit, see docs/admin/installation-granian.rst .. these are only nits, but why did you removed them?

It looks redundant, since we are already on Granian page. When making a reference from somewhere else, it is seen with the anchor name and not the header title, isn't it?

https://github.com/searxng/searxng/pull/4820/files#diff-36f30ffc7390620fd192a0b7d0eef5de8cf30c04e160d0da73c4d6b68d0c742aR158-R159

Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using this on my instance for the past week and didn't encounter any issues, so lgtm in that regard 👍

@return42
Copy link
Member

return42 commented Jul 4, 2025

It looks redundant, since we are already on Granian page. When making a reference from somewhere else, it is seen with the anchor name and not the header title, isn't it?

lorem ipsum `Granian options`_

.. _Granian options: https://github.com/emmett-framework/granian/blob/master/README.md#options

will be rendered to:

lorem ipsum Granian options


lorem ipsum :ref:`Granian configuration`

.. _Granian configuration:

Config
======
...

will be rendered to header title ..

lorem ipsum Config


To verify your modifications, use make docs.live .. it will build the docs and open them in your WEB browser.


If you don't want to see the header title you can use a notation like this ..

lorem ipsum :ref:`Granian config <Granian configuration>`

lorem ipsum Granian config

A short introduce can be found in our primer: Anchors & Links

@return42
Copy link
Member

return42 commented Jul 4, 2025

@inetol after a cleanup of the git history (squash the last 3 commits into the 2 first commits) this PR is ready to merge I think .. will you squash and merge .. or should I do it?

@inetol
Copy link
Member Author

inetol commented Jul 4, 2025

I'll do it, we need to make an announcement in Matrix room and https://github.com/searxng/searxng/discussions/categories/announcements

GH: #4972
Matrix: https://matrix.to/#/!vxScbLNEAmRvOraXBn:matrix.org/$bWCBghIP7vUUC_XPi2HGB70H3_-zCFWiEoNVs4o6T0E?via=matrix.org&via=tchncs.de&via=envs.net

Minor documentation changes.

Suggested searxng#4820 (comment)
Suggested searxng#4820 (comment)
Suggested searxng#4820 (comment)
Suggested searxng#4820 (comment)
Suggested searxng#4820 (comment)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@inetol inetol merged commit 01be261 into searxng:master Jul 4, 2025
7 checks passed
@inetol inetol deleted the granian branch July 4, 2025 12:35
inetol added a commit to searxng/searxng-docker that referenced this pull request Jul 4, 2025
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.

404 error Dockerfile compose change path configuration Review of SearXNG's docker documentation

4 participants