aboutsummaryrefslogtreecommitdiff
path: root/app/deployment/garage.hcl
diff options
context:
space:
mode:
Diffstat (limited to 'app/deployment/garage.hcl')
-rw-r--r--app/deployment/garage.hcl65
1 files changed, 29 insertions, 36 deletions
diff --git a/app/deployment/garage.hcl b/app/deployment/garage.hcl
index 3478706..8189ff3 100644
--- a/app/deployment/garage.hcl
+++ b/app/deployment/garage.hcl
@@ -12,10 +12,7 @@ job "garage" {
driver = "docker"
config {
image = "lxpz/garage_amd64:4"
- port_map {
- rpc_port = 3901
- api_port = 3900
- }
+ network_mode = "host"
volumes = [
"/mnt/storage/garage/data:/garage/data",
"/mnt/ssd/garage/meta:/garage/meta",
@@ -26,32 +23,26 @@ job "garage" {
]
}
- template {
- data = "{{ key \"configuration/garage/garage.toml\" }}"
- destination = "secrets/garage.toml"
- }
- template {
- data = "{{ key \"secrets/garage/garage-ca.crt\" }}"
- destination = "secrets/garage-ca.crt"
- }
- template {
- data = "{{ key \"secrets/garage/garage.crt\" }}"
- destination = "secrets/garage.crt"
- }
- template {
- data = "{{ key \"secrets/garage/garage.key\" }}"
- destination = "secrets/garage.key"
- }
+ template {
+ data = "{{ key \"configuration/garage/garage.toml\" }}"
+ destination = "secrets/garage.toml"
+ }
+ template {
+ data = "{{ key \"secrets/garage/garage-ca.crt\" }}"
+ destination = "secrets/garage-ca.crt"
+ }
+ template {
+ data = "{{ key \"secrets/garage/garage.crt\" }}"
+ destination = "secrets/garage.crt"
+ }
+ template {
+ data = "{{ key \"secrets/garage/garage.key\" }}"
+ destination = "secrets/garage.key"
+ }
resources {
memory = 500
cpu = 1000
- network {
- port "rpc_port" {
- static = "3901"
- }
- port "api_port" {}
- }
}
service {
@@ -61,12 +52,13 @@ job "garage" {
"traefik.frontend.entryPoints=https,http",
"traefik.frontend.rule=Host:garage.deuxfleurs.fr"
]
- port = "api_port"
- address_mode = "host"
+ port = 3900
+ address_mode = "driver"
name = "garage-api"
check {
type = "tcp"
- port = "api_port"
+ port = 3900
+ address_mode = "driver"
interval = "60s"
timeout = "5s"
check_restart {
@@ -77,14 +69,15 @@ job "garage" {
}
}
- service {
- tags = ["garage-rpc"]
- port = "rpc_port"
- address_mode = "host"
- name = "garage-rpc"
+ service {
+ tags = ["garage-rpc"]
+ port = 3901
+ address_mode = "driver"
+ name = "garage-rpc"
check {
type = "tcp"
- port = "rpc_port"
+ port = 3901
+ address_mode = "driver"
interval = "60s"
timeout = "5s"
check_restart {
@@ -93,7 +86,7 @@ job "garage" {
ignore_warnings = false
}
}
- }
+ }
}
}
}