aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/core/deploy/core.hcl72
-rw-r--r--app/garage-staging/config/garage.toml2
-rw-r--r--app/garage-staging/deploy/garage.hcl26
3 files changed, 60 insertions, 40 deletions
diff --git a/app/core/deploy/core.hcl b/app/core/deploy/core.hcl
index 39b4a17..f04f864 100644
--- a/app/core/deploy/core.hcl
+++ b/app/core/deploy/core.hcl
@@ -1,51 +1,51 @@
job "core" {
- datacenters = ["dc1"]
- type = "system"
- priority = 90
+ datacenters = ["dc1", "neptune"]
+ type = "system"
+ priority = 90
- constraint {
- attribute = "${attr.cpu.arch}"
- value = "amd64"
- }
+ constraint {
+ attribute = "${attr.cpu.arch}"
+ value = "amd64"
+ }
- update {
- max_parallel = 1
- stagger = "1m"
- }
+ update {
+ max_parallel = 1
+ stagger = "1m"
+ }
- group "network" {
- task "diplonat" {
- driver = "docker"
+ group "network" {
+ task "diplonat" {
+ driver = "docker"
- config {
- image = "darkgallium/amd64_diplonat:v3"
- network_mode = "host"
- readonly_rootfs = true
- privileged = true
- }
+ config {
+ image = "darkgallium/amd64_diplonat:v3"
+ network_mode = "host"
+ readonly_rootfs = true
+ privileged = true
+ }
- restart {
- interval = "30m"
- attempts = 2
- delay = "15s"
- mode = "delay"
- }
+ restart {
+ interval = "30m"
+ attempts = 2
+ delay = "15s"
+ mode = "delay"
+ }
- template {
- data = <<EOH
+ template {
+ data = <<EOH
DIPLONAT_PRIVATE_IP={{ env "attr.unique.network.ip-address" }}
DIPLONAT_REFRESH_TIME=60
DIPLONAT_EXPIRATION_TIME=300
DIPLONAT_CONSUL_NODE_NAME={{ env "attr.unique.hostname" }}
RUST_LOG=debug
EOH
- destination = "secrets/env"
- env = true
- }
+ destination = "secrets/env"
+ env = true
+ }
- resources {
- memory = 40
- }
- }
- }
+ resources {
+ memory = 40
+ }
+ }
+ }
}
diff --git a/app/garage-staging/config/garage.toml b/app/garage-staging/config/garage.toml
index 60f97c5..2ed46c0 100644
--- a/app/garage-staging/config/garage.toml
+++ b/app/garage-staging/config/garage.toml
@@ -19,5 +19,5 @@ api_bind_addr = "[::]:3990"
[s3_web]
bind_addr = "[::]:3992"
-root_domain = ".web-staging.deuxfleurs.fr"
+root_domain = ".garage-staging-web.home.adnab.me"
index = "index.html"
diff --git a/app/garage-staging/deploy/garage.hcl b/app/garage-staging/deploy/garage.hcl
index a0b5d66..9284461 100644
--- a/app/garage-staging/deploy/garage.hcl
+++ b/app/garage-staging/deploy/garage.hcl
@@ -56,9 +56,7 @@ job "garage-staging" {
service {
tags = [
"garage-staging-api",
- "traefik.enable=true",
- "traefik.frontend.entryPoints=https,http",
- "traefik.frontend.rule=Host:garage-staging.deuxfleurs.fr"
+ "tricot garage-staging.home.adnab.me",
]
port = 3990
address_mode = "driver"
@@ -96,6 +94,28 @@ job "garage-staging" {
}
}
+ service {
+ tags = [
+ "garage-staging-web",
+ "tricot *.garage-staging-web.home.adnab.me",
+ ]
+ port = 3992
+ address_mode = "driver"
+ name = "garage-staging-web"
+ check {
+ type = "tcp"
+ port = 3992
+ address_mode = "driver"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+
restart {
interval = "30m"
attempts = 10