michaelmob / docker-funkwhale

All-in-one funkwhale docker image.
92 stars 18 forks source link

media / cover-art url wrong #25

Closed Source-Kod closed 4 years ago

Source-Kod commented 5 years ago

This was posted on the FunkWhale GitLab here https://dev.funkwhale.audio/funkwhale/funkwhale/issues/790. I added a comment there. But I think this is probably the more relevant place to post this issue.

OP: I am using the docker all-in-one image. (havent tried anything else), behind an nginx proxy. Everything works perfect, however all media is refered to using 127.0.0.1, so all coverart on the fronted is givint 404. If i take the url and change 127.0.0.1 to the real funkwhale domain, the cover-art will show up. You can see the code in the attachement. In ultrasonic (android app) the cover art works, so it seems to be an issue in funkwhale frontend. image

My comment: I am also using the docker all-in-one image and having this same problem. I'm using nginx proxy also, but the album art is still messed up when I use the local ip and avoid the proxy. Changing the https://127.0.0.1:8000 in the browser dev tools to ether my domain name which uses the nginx proxy or my local ip:5000 fixes it. The album art is working perfect in the Subsonic android app I'm using though. Audinaut.

Source-Kod commented 5 years ago

If I change the NESTED_PROXY=1 to NESTED_PROXY=0 it works on my local network. And if I connect through the nginx proxy(but still on local network) it still work because it changes the the https://127.0.0.1:8000 to my servers local ip.

edit: Also is there a difference in running funkwhale/all-in-one:0.19.1 or thetarkus/funkwhale? Which one should I be using?

n1zzo commented 5 years ago

The issue was caused by a missing line in the funkwhale_proxy_nested.conf file, the cover URL were rendered correctly using the non-nested option, so I've added the

proxy_set_header X-Real-IP $remote_addr;

option in the nested config file.

Fixed in PR 10e83c4 .

Source-Kod commented 5 years ago

Thank you, n1zzo. :)

Log1x commented 5 years ago

Can we get this pushed to Docker Hub? I feel like there may be some underlying issues even past this with my experience with CloudFlare– but I'd like to test this.

Log1x commented 5 years ago

Although I will point out this PR effectively reversed https://github.com/thetarkus/docker-funkwhale/issues/19 – but being that #19 didn't solve the overall issue...

tnyeanderson commented 5 years ago

Also is there a difference in running funkwhale/all-in-one:0.19.1 or thetarkus/funkwhale? Which one should I be using?

Last update for thetarkus/funkwhale was 5 months ago. all-in-one seems to be more active, so use that.

Many thanks @n1zzo! Is there anything we need to do before this gets pushed?

Log1x commented 5 years ago

Not to shamefully plug, but in case anyone wants an image setup properly for both reverse proxy/non-reverse proxy as well as the latest version (7.0), I've created an image. You can also add my repository if you use unRAID.

valahna commented 4 years ago

I had the same issue with the all-in-one docker image (latest pull funkwhale / all-in-one : latest) and neither the .env flag for NESTED_PROXY=1 nor NESTED_PROXY=0 resolved the issue. Adding or removing proxy_set_header X-Real-IP $remote_addr; in the funkwhale_proxy.conf or funkwhale_proxy_nested.conf file had no appreciable effect. I could not get the album art to display even when bypassing the immediate proxy.

After much digging, trial, and error, I changed: proxy_set_header Host $http_x_forwarded_host; to proxy_set_header Host $host; in the appropriate *proxy.conf file and suddenly album art everywhere O.O

I have this setup: client --> reverse_proxy & docker host --> funkwhale all-in-one container

My issue could be unique in that I am running this container on a synology NAS. I hope it helps anyone else with this issue :)