bastienwirtz / homer

A very simple static homepage for your server.
https://homer-demo.netlify.app/
Apache License 2.0
9.1k stars 770 forks source link

Custom services in Docker #248

Closed danielshughes closed 2 years ago

danielshughes commented 3 years ago

How can i use the cutsom services e.g. Radarr, Sonarr etc. in Docker?

I can't see the src/components/ folder in the mounted www/assets/ folder and when adding type"Sonarr" to my Sonarr entry it makes it disappear

fbartels commented 3 years ago

Yes, that file is indeed not present in the compiled version, you can only see it in the source. Maybe your container is too old and does not yet have the Sonarr plugin?

crwallace2 commented 3 years ago

I updated to the newest docker container today, and you have to add 2 lines to the config.

type: "Radarr"
apikey: "get API Key from Radar general settings"

I am running behind a reverse proxy also so I had to add some headers in the nginx proxy conf file as well to deal with CORS issues.

    add_header Access-Control-Allow-Origin https://domain.com;
    add_header Access-Control-Allow-Credentials true;
    add_header Access-Control-Allow-Headers x-api-key;
Toneti10 commented 3 years ago

I am experiencing problems when configuring Sonarr. I am using Docker on DSM 7 (Synology) and homer returns the following message:

Connection error to Sonarr API, check url and apikey in config.yml

My config.yml looks like:

- name: "sonarr"
  logo: "assets/icons/sonarr.png"
  url: "http://192.168.XXX.YYY:ZZZZ" # I have hidden the real numbers
  target: "_blank"
  type: "Sonarr"
  apikey: "xxxxxxxx" # The one I found in Sonarr -> Settings -> General -> Security -> API Key

Maybe I need to add a suffix in the URL? Something additional in Sonarr config? My port number is ZZZZ and my Sonarr -> Settings -> General -> Security config is:

Authentication: None
API Key: xxxxxxxx
Certificate Validation: Disable for Local Addresses # Was enable, changed in order to try to solve the issue

I am able to access to

http://192.168.XXX.YYY:ZZZZ/api/command?apikey=xxxxxxxx

The output is an empty webpage, but if I change de apikey, it says error: "Unauthorized", so I think the apikey I introduced in the config.yml is correct.

I created the homer container with the following command:

docker run -d \
 --name=homer \
 --dns 192.168.AAA.BBB \ # Router IP
 -e PUID=1026 \
 -e PGID=100 \
 -e UMASK_SET=022 \
 -p PPPP:8080 \ # PPPP is a number
 -v /volume1/docker/homer:/www/assets \
 -e TZ=Europe/Madrid \
 --restart always \
b4bz/homer:latest

Thanks in advance

waschinski commented 3 years ago

Please open the developer tools in your browser and check the console/network tab for more details on the problem you are facing.

Toneti10 commented 3 years ago

Please open the developer tools in your browser and check the console/network tab for more details on the problem you are facing.

Thanks! I got the same error as #250 so I'm going to follow up on that issue.

bastienwirtz commented 2 years ago

Hi there!

That's most probably a CORS issue. Check out the troubleshooting section and search for "cors" in past issues. I'm closing the issue as the CORS issue is common and documented. Feel free to reopen it if needed.