Skip to content

Commit 7ec8077

Browse files
committed
Add port_map to example job
1 parent 40eea76 commit 7ec8077

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ For now you can:
4242
* [Nomad runtime environment](https://www.nomadproject.io/docs/runtime/environment.html) is populated
4343
* use nomad alloc data in the container.
4444
* bind mount custom volumes into the container
45+
* publish ports
4546
* monitor the memory consumption
4647
* monitor CPU usage (might be buggy)
4748
* container memory is limited to configured value
@@ -137,11 +138,18 @@ job "redis" {
137138
138139
config {
139140
image = "docker://redis"
141+
port_map {
142+
redis = 6379
143+
}
140144
}
141145
142146
resources {
143147
cpu = 500
144148
memory = 256
149+
network {
150+
mbits = 20
151+
port "redis" {}
152+
}
145153
}
146154
}
147155
}

0 commit comments

Comments
 (0)