gilyes / docker-nginx-letsencrypt-sample

Dockerized Nginx + Let's Encrypt sample
https://gilyes.com/docker-nginx-letsencrypt
384 stars 185 forks source link

Is VIRTUAL_NETWORK env var really mandatory? #1

Closed coodix closed 7 years ago

coodix commented 7 years ago

There are two example services and they both have environment variable VIRTUAL_NETWORK.

Is it really necessary?

Actual nginx.tmpl doesn't have any logic base on this var.

And why have you removed networks section from docker-compose.yml? Without that it's impossible to make it's working if the external service is located outside the same docker-compose.yml. For example it could be launched manually or through different docker-compose.yml on the same server.

gilyes commented 7 years ago

Yes, the network has to be explicitly specified if you want to talk to external services, but in this simple example all services are connected to the default/implicit network created by compose.

And you are right, the VIRTUAL_NETWORK environment variable is useless, just got left in there from a prior version.

coodix commented 7 years ago

Thanks for explanation!