Just in case anybody stumbles here for running several Discourse instances behind https://github.com/jwilder/nginx-proxy:
Set discourse to listen on a local link port and tell the proxy to use the container’s internal port 80 like
expose:
- "127.0.0.1:2836:80"
env:
VIRTUAL_PORT: '80'