I don't have it setup this way myself. I just have nginx point to http://1.2.3.4:8123 where 1.2.3.4 is the LAN IP of your docker host.
I know there are ways to connect containers with the backend docker network and I think that is what you are trying to do. I've seen examples for Caddy and Traefik doing it this way to make setup "easier".