job "simple-server" { type = "service" datacenters = ["dc1"] update { stagger = "3s" max_parallel = 1 } group "simple-server" { count = 2 task "simple-server" { service { name = "simple-server" port = "http" } driver = "docker" config { image = "mydockerregistry.com/simple-server:0.0.1" auth { server_address = "https://mydockerregistry.com" username = "admin" password = "admin" } port_map = { http = 40000 } } resources { cpu = 200 memory = 100 network { mbits = 1 port "http" { } } } } }
}--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/c8f981e3-1f4b-47c4-8065-6b2db308efb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I use consul-template to update haproxy.cfg.
Here is the conf of consul-template.
listen simple-server
balance roundrobin
bind *:9982{{range service "simple-server"}}
server {{.Node}} {{.Address}}:{{.Port}}{{end}}
option forwardfor
option httpclose
option http-server-close
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/c8f981e3-1f4b-47c4-8065-6b2db308efb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.