Check out projects like Traefik (https://github.com/containous/traefik) as well. Traefik is a reverse proxy that can automatically configure routes based on labels on your docker containers, and automatically setup Let's Encrypt certs for your subdomains.
E.g. I add a label to my Gitea container to say "Serve this from git.mydomain.com", and Traefik will start redirecting requests and automatically configure a Let's Encrypt cert.