aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-12-04 12:32:46 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-12-04 12:32:46 +0100
commitd694ddbe2c51192b69ee9803a6b4b0cdd5f4247f (patch)
tree76c362675125300554deb06be045c2ed1721d367
parent0c3db22de600af56ed5e5d2db4c5d0c978d359f6 (diff)
downloadnixcfg-d694ddbe2c51192b69ee9803a6b4b0cdd5f4247f.tar.gz
nixcfg-d694ddbe2c51192b69ee9803a6b4b0cdd5f4247f.zip
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
-rw-r--r--cluster/prod/app/garage/deploy/garage.hcl20
1 files 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",
]
@@ -172,6 +169,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",
"tricot k2v.deuxfleurs.fr",
"tricot-site-lb",