A
A
AstonMartin2019-12-20 11:49:07
Nginx
AstonMartin, 2019-12-20 11:49:07

How to make docker containers with git branches available for external testing?

Good afternoon!
I continue to set up environments for testing git branches)
There are: vps with a real ip, multiple subdomains like feauture-1.test.domain.com, on which versions of the site (branch) will be uploaded in separate docker containers through teamcity. All subdomains with https.
I made requests for all *.test.domain.com subdomains come to nginx on the host machine where the wildcard ssl certificate is inserted. There are docker containers on the same machine, which are deployed after teamcity sees a commit to the repository.
Question: how to make external http requests go to the corresponding docker containers (domain = branch)? Do proxy_pass in nginx on host machine? To what addresses? Or how to organize the scheme more competently?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-12-20
@q2digger

nginx + consul + consul-template.
A new container is created - an entry appears in the consul, consul-template generates a new virtual host from the template and slips it into nginx.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question