Discourse not working through separate nginx docker

I found the solution. I had to add the following to the .yml file:

docker_args: "--network apps_plexnet"

networks:
  apps_plexnet:
    external: true

After that I rebuilt it. Now they can see eachother and it all works.