From d694ddbe2c51192b69ee9803a6b4b0cdd5f4247f Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 4 Dec 2023 12:32:46 +0100 Subject: [PATCH] Move garage's redirections to a dedicated service Reason: - do not slow down the garage web endpoint - required now that we map domain name to a garage bucket --- cluster/prod/app/garage/deploy/garage.hcl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/cluster/prod/app/garage/deploy/garage.hcl b/cluster/prod/app/garage/deploy/garage.hcl index a16138c..5c8a5f7 100644 --- a/cluster/prod/app/garage/deploy/garage.hcl +++ b/cluster/prod/app/garage/deploy/garage.hcl @@ -138,9 +138,6 @@ job "garage" { "tricot-add-header X-Frame-Options SAMEORIGIN", "tricot-add-header X-XSS-Protection 1; mode=block", "tricot-add-header X-Content-Type-Options nosniff", - "tricot-add-redirect www.deuxfleurs.fr deuxfleurs.fr 301", - "tricot-add-redirect osuny.org www.osuny.org 301", - "tricot-add-redirect www.degrowth.net degrowth.net 301", "tricot-on-demand-tls-ask http://garage-admin.service.prod.consul:3903/check", "tricot-site-lb", ] @@ -170,6 +167,23 @@ job "garage" { } } + service { + tags = [ + "garage-redirect-dummy", + "tricot www.deuxfleurs.fr 2", + "tricot osuny.org 2", + "tricot www.degrowth.net 2", + "tricot-add-redirect www.deuxfleurs.fr deuxfleurs.fr 301", + "tricot-add-redirect osuny.org www.osuny.org 301", + "tricot-add-redirect www.degrowth.net degrowth.net 301", + ] + name = "garage-redirect-dummy" + address_mode = "host" + port = "web" + on_update = "ignore" + } + + service { tags = [ "garage_k2v",