How to make dostupnymi Docker containers with git branches for external testing?

Good day!

Continue to configure the environment for testing git-branches)

Have: vps with real ip, multiple subdomains kinds that will be in a separate Docker containers to give version of the site (branch) via teamcity. All subdomains with https.
Made that requests for all subdomains of * come on nginx on the host machine where stuck a wildcard ssl certificate. There are Docker containers on the same machine that unfold after teamcity will see a commit to the repository.

Question: how to make external http requests passed to the corresponding Docker container (domain = branch)? To do proxy_pass to nginx on the host machine? At what addresses? Or as it is generally clever to make a scheme?
April 3rd 20 at 18:47
1 answer
April 3rd 20 at 18:49
nginx + consul + consul-template.
Creates a new container appears in the Consul, consul-template generates a new virtual host from a template and shoved it in nginx.

Find more questions by tags NginxGitDeploymentTeamCityDocker