diff --git a/containers/wg-easy.hcl b/containers/wg-easy.hcl new file mode 100644 index 0000000..69d89e5 --- /dev/null +++ b/containers/wg-easy.hcl @@ -0,0 +1,51 @@ +job "wg-easy" { + + datacenters = ["dc"] + + type = "service" + + group "wg-easy" { + count = 1 + + task "wg-easy" { + driver = "docker" + + config { + image = "weejewel/wg-easy" + ports = ["vpn", "webui"] + network_mode = "host" + volumes = [ + "${NOMAD_ALLOC_DIR}/wg-easy:/etc/wireguard", + ] + + } + } + + network { + mode = "host" + + port "vpn" { + static = 51820 + to = 51820 + } + port "webui" { + static = 51821 + to = 51821 + } + + } + + service { + name = "wgeasy" + port = "webui" + provider = "nomad" + check { + type = "http" + path = "/" + interval = "20s" + timeout = "60s" + } + } + + } +} \ No newline at end of file