Skip to content
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

interlock.domain and interlock.hostname variables in nginx template #240

Open
vkakhnych opened this issue Aug 8, 2017 · 1 comment
Open

Comments

@vkakhnych
Copy link

vkakhnych commented Aug 8, 2017

Is it possible to get that variables?

Depends on environment (dev/stage/prod) we have different domains and want to add env based locations in nginx template. Now we have to compare FQDN like:

{{ if eq $host.Upstream.Name "app1.testing.local" }}
...
{{ if eq $host.Upstream.Name "app2.testing.local" }}
...
{{ if eq $host.Upstream.Name "app999.testing.local" }}
...

We want something like:

{{ if eq $host.Upstream.domain "testing.local" }}
...

Thanks!

@ehazlett
Copy link
Owner

It could be added but there can be multiple hosts so you would have to check the slice (https://github.com/ehazlett/interlock/blob/master/ext/lb/nginx/config.go#L24)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants