-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no servers inside upstream in /etc/nginx/conf.d/default.conf when specifying an hostname #344
Comments
Ok my problems was the specified hostname like said in #336 (comment). |
I experience the same issue. No upstream servers. I use the nginx.tmpl from nginx-proxy. Like suggested by the docker hub page. I tried to debug it and added some lines to the template at the top:
Line 1 is in there by default and is later used to compare if a potential backend container is in the same network as the current container. Line 2 and 3 I added and it looks like they are empty:
I'm not good at go templates but I see there is a |
@Syphdias could you post the result of |
Sure
Edit: Just in case:
|
@Syphdias thanks, could you also post results of
|
Will check as soon as I am home. I guess you are suspecting not enough privileges or capabilities? |
The last two files are currently used to search for the container ID, the first one will be added by #336. I'm curious to see if your container ID is actually inside one of those files, and if not why / how should we update the |
|
I saw the merge #345. Will the template need to change? Because I tried
|
Oh, btw |
Found a fix:
|
This fixed it for me |
@buchdag, I tired to test this by building from source with
|
Seeing the same issue, using the template from this repo, which is 8 years old. Is it up to date? I'm running
(yes, it dumps it to the console only). The endpoint I had to added, because the default (unlike the documentation states) is Docker-get does see changes when I start/stop an container; but then just states the default entry isn't any different, and generates something near-empty.
The container ID is correct, and running What magic is needed to make things work/debug? Are there any special labels needed on the origin containers to part of parsing? When turning on 'only published' and other options, I do actually see correct numbers in the output as well. As a 'expose random port' I used EDIT: |
@oliv3r no this template isn't up to date. The templates in the repo were meant as minimal examples only and unfortunately aren't really maintained. In the case of nginx reverse proxy template, there is an actively maintained version, the one used in nginx-proxy/nginx-proxy. |
I switched to using the template linked above as it does everything I wanted it to do :) Took some time to figure out how the template worked though. But I still think the template in this repo should work, even if it is basic, as it is used as a 'starting point'? |
I use docker-gen through nginx-proxy and got this nginx-proxy/nginx-proxy#1548 which seems to be linked to docker-gen. It seems it can't find the ip of the other container
with netiher /proc/self/cgroup" nor "/proc/self/mountinfo"(It seems I miss understood how the IP of the others containers was found). FYI I use docker swarm on arch, Here is my docker infoThe text was updated successfully, but these errors were encountered: