Funkwhale streaming with seperate Reverse Proxy
I have a docker multi-container setup running on one machine but run it in a network that uses another machine to serve all services by reverse proxy them. You can perfectly use the offered apache2-config for this reverse proxy.
But!
But as the serving of media is done by websocket and X-send-protocol you need some dirty trick to make that work - at least I knew no clean way ... As the the apache will search the media files at the exact same place as on the funkwhale driving machine. I.e. if the media folder on the docker host lies at /volume/docker/srv/funkwhale/data/ apache needs to find it on its hosting machine at the exact same path!
I worked around that by
sudo mkdir -p /volume/docker/srv/funkwhale/data
and
sudo mkdir -p /volume/docker/srv/funkwhale/front
and mounted those folders from the funkwhale hosting machine by sshfs (could also use any other file transfer service like smb or sftp e.g.) on the apache hosting machine:
sshfs#admin@192.168.10.40:/docker/srv/funkwhale/data /volume/docker/srv/funkwhale/data fuse uid=0,gid=33,umask=0,allow_other,_netdev,port=7072,identityFile=/root/.ssh/funkwhale 0 0
This means surely to weaken security unnecessarily. But as long as I need the seperate proxy server in this network and don't know a better way to send the media files through docker's nginx reverse proxy to the apache's.