Skip to content

Commit

Permalink
command: use correct port mapping syntax in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nickethier committed Sep 3, 2020
1 parent 6875248 commit 8922a38
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 12 deletions.
8 changes: 4 additions & 4 deletions command/assets/example-short.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ job "example" {

group "cache" {
network {
port "db" {}
port "db" {
to = 6379
}
}

task "redis" {
Expand All @@ -12,9 +14,7 @@ job "example" {
config {
image = "redis:3.2"

port_map {
db = 6379
}
ports = ["db"]
}

resources {
Expand Down
8 changes: 4 additions & 4 deletions command/assets/example.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ job "example" {
# https://www.nomadproject.io/docs/job-specification/network
#
network {
port "db" {}
port "db" {
to = 6379
}
}

# The "service" stanza instructs Nomad to register this task as a service
Expand Down Expand Up @@ -302,9 +304,7 @@ job "example" {
config {
image = "redis:3.2"

port_map {
db = 6379
}
ports = ["db"]
}

# The "artifact" stanza instructs Nomad to download an artifact from a
Expand Down
Loading

0 comments on commit 8922a38

Please sign in to comment.