Nginx - 502 Gateway Error in Docker container

I’m currently in the process of migrating a Peertube instance over to docker, I’ve got it running and it seems to be working well when I use the local IP and port number, but when I try to get it to run over Nginx I get a 502 bad gateway.
I’m not really sure exactly what I’m doing wrong either, it’s effectively the same nginx config- it’s just pointing to the IP address and port of the docker container
This is my Nginx config:
And relevant sections of my Peertube config:

Worth mentioning that I’m also moving Nginx to a docker container. At the moment however, it seems it is working correctly as I’m able to see the « Welcome to Nginx » page correctly.

Ok I seem to have got it starting to redirect from Nginx, but now it gives me a white screen with errors in the console about js files being blocked because of a disallowed mime type.

hi. Please make sure you use the Nginx template we provide, and that the aliased directories within are accessible under the same path in your Nginx container.