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

librex browser search integration - firefox with LibreX Docker container #248

Open
myobfee opened this issue Jun 18, 2023 · 2 comments
Open

Comments

@myobfee
Copy link

myobfee commented Jun 18, 2023

In utilizing right-click option to add local LibreX instance as default browser search engine, any subsequent browser searches fail as LibreX defaults to docker IP/port (127.0.0.1:8080) instead of proxied domain for browser bar searches. Using Cosmos as proxy front-end: https://github.com/azukaar/Cosmos-Server. LibreX works when accessed via external URL directly.

Hoping there is an un-documented environment variable to add to the docker-compose.yml to address so external domain is used in browser search query instead of docker IP/port (127.0.0.1:8080)

@molytov
Copy link

molytov commented Jun 21, 2023

Yeah seeing this too when trying to do it with docker-compose. No matter what files I tried to edit or trying to pass the variable in the Dockerfile, it wouldn't work.

I added -e "OPEN_SEARCH_HOST="https://yourinstance.tld" to the docker run command and it solved the issue for me.
You can check this quickly by going to yourinstance.tld/opensearch.xml and making sure that the template= section has the domain you set.

Overall, the command should look like this:
docker run --name librex -e "OPEN_SEARCH_HOST="https://yourinstance.tld" -e SOME_OTHER_VARIABLE="someothervalue" -p 8080:8080 librex/librex:latest. If you're using a different port, make sure it's the port on the left of the : that you're changing.

I'm a mess with docker so I dunno what the actual fix is, but I hope one is found soon for docker-compose.

@lalo-s
Copy link

lalo-s commented Jun 24, 2023

I faced the same issue with Firefox. You can solve this creating a new opensearch.xml file or extracting it from your container and change it to point to your domain. Finally, mount this .xml on your compose file and recreate the container.

  - /volume3/docker/librex/nginx:/var/log/nginx
  - /volume3/docker/librex/logs:/var/log/php7
  - /volume3/docker/librex/opensearch.xml:/var/www/html/opensearch.xml

Regards

@kubo6472
Copy link

Yes, I would love to have a env var. I think that's what Change opensearch.xml to point to your domain means here.

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

No branches or pull requests

4 participants