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

Config Environment Variables not working #839

Closed
PaPaTheGMan opened this issue Sep 2, 2022 · 6 comments · Fixed by #841
Closed

Config Environment Variables not working #839

PaPaTheGMan opened this issue Sep 2, 2022 · 6 comments · Fixed by #841
Labels
bug Something isn't working

Comments

@PaPaTheGMan
Copy link

I'm using various 'WHOOGLE_CONFIG' environment variables in my docker set up and only the 'THEME' seems to work. I'm most interested in getting the 'NEW_TAB' as that is a great time saver for me but would like to see the others as well.

To Reproduce
Create a docker container as follows:
docker run -d
--name whoogle
-p 5080:5000
-e WHOOGLE_CONFIG_COUNTRY="United States"
-e WHOOGLE_CONFIG_THEME=dark
-e WHOOGLE_CONFIG_NEW_TAB=true
--restart unless-stopped
benbusby/whoogle-search:latest

When accessing a Whoogle search only the Theme has been set, the other environment items as still at default.

Deployment Method

  • [ X] Docker

Version of Whoogle Search

  • [ X] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)
  • [ X] v0.7.4

Desktop (please complete the following information):

Smartphone (please complete the following information):

  • N/A

Additional context
Docker Container is running on an Intel Celeron 3865U (2) @ 1.800GHz - Ubuntu 22.04.1 LTS x86_64
Docker version is 20.10.17, build 100c701

@jacr13
Copy link
Contributor

jacr13 commented Sep 7, 2022

I have looked at your issue and indeed there is a bug.
The problem is that as it is, whoogle only accepts 1 or 0 as (true and false) inputs.

I have done a fix for this and hope Ben can merge it soon =)

In the meantime, you can replace true by 1 and false by 0 and your environment variables will work !

@PaPaTheGMan
Copy link
Author

PaPaTheGMan commented Sep 7, 2022 via email

@jacr13
Copy link
Contributor

jacr13 commented Sep 7, 2022

Ben has already merged the pull request, so just update your image, and it should work fine.

For the country, you should use US:
-e WHOOGLE_CONFIG_COUNTRY="US"

@PaPaTheGMan
Copy link
Author

PaPaTheGMan commented Sep 8, 2022 via email

@jacr13
Copy link
Contributor

jacr13 commented Sep 8, 2022

For the language, you need to specify it with lang_ first:
-e WHOOGLE_CONFIG_LANGUAGE="lang_fr" # for the interface (french)
-e WHOOGLE_CONFIG_SEARCH_LANGUAGE="lang_en" # for the search results (english)

@PaPaTheGMan
Copy link
Author

PaPaTheGMan commented Sep 8, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants