Skip to content

Forwarding another port for longpolling #2013

Answered by Cl0ut1eR
Cl0ut1eR asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the long reply, i made it work by changing the base configuration file. /app/nginx.tmpl
i modified the function to create upstreams, to accept a port from the code and called it with a hard codded port.
in my case this file will never be changed so i does not really matter that it is hard coded. Im sure you could make something really nice by using environment variables, like SecondPort1 = 123 and SecondPortName = Name (its not real code) or something like this.
here is one of my call to add the second port. (the function was changed so it wont work by default for you)
{{ template "upstream" (dict "Upstream" $longpolling "Containers" $containers "Networks" $CurrentContainer.Netw…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@wguerram
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Cl0ut1eR
Comment options

You must be logged in to vote
4 replies
@Cl0ut1eR
Comment options

@k0dard
Comment options

@Cl0ut1eR
Comment options

@JonasBVS
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants