diff --git a/.github/deploy/guess-my-word.nomad b/.github/deploy/guess-my-word.nomad index ed29b43..9661c58 100644 --- a/.github/deploy/guess-my-word.nomad +++ b/.github/deploy/guess-my-word.nomad @@ -73,6 +73,24 @@ job "guess-my-word" { } } + service { + name = "guess-my-word-redirect" + provider = "nomad" + port = "web" + tags = [ + "traefik.enable=true", + "traefik.http.routers.guessredirect.rule=Host(`guess.taiidani.com`)", + "traefik.http.routers.guessredirect.middlewares=guessredirect@nomad", + "traefik.http.routers.guessredirectsecure.rule=Host(`guess.taiidani.com`)", + "traefik.http.routers.guessredirectsecure.tls=true", + "traefik.http.routers.guessredirectsecure.tls.certresolver=le", + "traefik.http.routers.guessredirectsecure.middlewares=guessredirect@nomad", + "traefik.http.middlewares.guessredirect.redirectregex.regex=^http.?://guess.taiidani.com/(.*)", + "traefik.http.middlewares.guessredirect.redirectregex.replacement=https://guessmyword.xyz/", + "traefik.http.middlewares.guessredirect.redirectregex.permanent=true", + ] + } + resources { cpu = 50 memory = 128