.
This commit is contained in:
parent
dede9ce18d
commit
15f60f0465
7 changed files with 111 additions and 270 deletions
|
|
@ -2,14 +2,24 @@ job "nats" {
|
|||
type = "service"
|
||||
|
||||
group "nats" {
|
||||
|
||||
network {
|
||||
mode = "host"
|
||||
mode = "bridge"
|
||||
port "nats" {
|
||||
to = 4222
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "nats"
|
||||
port = "nats"
|
||||
address_mode = "alloc"
|
||||
check {
|
||||
type = "tcp"
|
||||
interval = "1s"
|
||||
timeout = "1s"
|
||||
}
|
||||
}
|
||||
|
||||
task "nats" {
|
||||
driver = "docker"
|
||||
|
||||
|
|
@ -22,18 +32,6 @@ job "nats" {
|
|||
cpu = 500
|
||||
memory = 1000
|
||||
}
|
||||
|
||||
service {
|
||||
name = "nats"
|
||||
port = "nats"
|
||||
provider = "consul"
|
||||
|
||||
check {
|
||||
type = "tcp"
|
||||
interval = "5s"
|
||||
timeout = "1s"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue