Created
March 30, 2022 18:09
-
-
Save schmichael/de8b1f5a92fc2d2a576560f3560aba3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client { | |
host_network "public" { | |
cidr = "192.168.86.227/32" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "example" { | |
datacenters = ["dc1"] | |
group "cache" { | |
network { | |
port "db" { | |
to = 6379 | |
host_network = "public" | |
} | |
} | |
task "redis" { | |
driver = "docker" | |
config { | |
image = "redis:3.2" | |
ports = ["db"] | |
} | |
resources { | |
cpu = 500 | |
memory = 256 | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -E nomad agent -dev -config hostnet.hcl | |
# In another terminal | |
nomad run hostnet.nomad |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment