Closed tka85 closed 1 year ago
Thanks for the suggestion. I will extend the README to describe the situation when the upstream is located in another docker-compose.yml.
Another option will be to expose the upstream through some port and configure Nginx upstream as server host.docker.internal:{{port}}
.
Also worth mentioning that the location
section of nginx-conf/conf.d/mydomain.com.conf
in this case will need to have additionally:
resolver 127.0.0.11;
Resolver 127.0.0.11 is added automatically if answer Yes to the question
Proxy to a server defined in the same docker-compose.yml (y/n)
But it is needed as well if the answer to this question is No
.
Without it, even being in the same network, nginx couldn't find the container where to forward the requests simply using its name.
Error was no resolver defined to resolve...
.
Updated the README and pushed a fix to the CLI tool. Rebuild the CLI tool after pulling the latest updates: docker compose build cli
.
Seems it's worth mentioning in the docs that the default setup creates network
letsencrypt-docker-compose_default
for all its containers. This proves useful given that the initialization script offers forReverse proxy
the option toProxy to a server defined in the same docker-compose.yml (y/n)
.In my case the service to which the reverse proxy relays requests is in a separate docker-compose.yml and has its own network. But even if it doesn't have its own network, it's worth mentioning that in that case my own services should be configured to use the
letsencrypt-docker-compose_default
network.