From 4b2fe5ad279ebf5ef46d6e5271400a1fcd6f04ae Mon Sep 17 00:00:00 2001 From: Luigi Oliveira Date: Sat, 12 Aug 2023 02:55:56 -0300 Subject: [PATCH] wgeasy template --- containers/wg-easy.hcl | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 containers/wg-easy.hcl 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