You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around with this container and it looks great! The docs are pretty sparse though.
In particular I would like to know how to limit which services appear in the template. For example I have a consul server on a host which has different containers; a few web containers and a few databases for example. I don't want the mysql services to be put in the template, since nginx won't be routing traffic to the database. I only want certain web containers to be in the template.
Can this be done? If so, could you improve the docs?
The text was updated successfully, but these errors were encountered:
Yes, you can exclude a service from template by adding a service name to consul template file like this
nginx.conf.ctmpl
-{{ range $service := services }} {{ if ne $service.Name "consul" }}+{{ range $service := services }} {{ if ne $service.Name "consul" }} {{ if ne $service.Name "mysql" }}
I've been playing around with this container and it looks great! The docs are pretty sparse though.
In particular I would like to know how to limit which services appear in the template. For example I have a consul server on a host which has different containers; a few web containers and a few databases for example. I don't want the mysql services to be put in the template, since nginx won't be routing traffic to the database. I only want certain web containers to be in the template.
Can this be done? If so, could you improve the docs?
The text was updated successfully, but these errors were encountered: