Migrate Garage

This commit is contained in:
Quentin 2020-12-22 17:48:27 +01:00
parent 9f6f0fb53c
commit b29028405d

View file

@ -9,6 +9,11 @@ job "garage" {
} }
group "garage" { group "garage" {
network {
port "s3" { static = 3900 }
port "rpc" { static = 3901 }
}
task "server" { task "server" {
driver = "docker" driver = "docker"
config { config {
@ -16,19 +21,21 @@ job "garage" {
image = "lxpz/garage_amd64:4" image = "lxpz/garage_amd64:4"
network_mode = "host" network_mode = "host"
volumes = [ volumes = [
"/mnt/storage/garage/data:/garage/data", "/mnt/storage/garage/data:/garage/data",
"/mnt/ssd/garage/meta:/garage/meta", "/mnt/ssd/garage/meta:/garage/meta",
"secrets/garage.toml:/garage/config.toml", "secrets/garage.toml:/garage/config.toml",
"secrets/garage-ca.crt:/garage/garage-ca.crt", "secrets/garage-ca.crt:/garage/garage-ca.crt",
"secrets/garage.crt:/garage/garage.crt", "secrets/garage.crt:/garage/garage.crt",
"secrets/garage.key:/garage/garage.key", "secrets/garage.key:/garage/garage.key",
] ]
} }
template { template {
data = "{{ key \"configuration/garage/garage.toml\" }}" data = file("../config/configuration/garage/garage.toml")
destination = "secrets/garage.toml" destination = "secrets/garage.toml"
} }
# --- secrets ---
template { template {
data = "{{ key \"secrets/garage/garage-ca.crt\" }}" data = "{{ key \"secrets/garage/garage-ca.crt\" }}"
destination = "secrets/garage-ca.crt" destination = "secrets/garage-ca.crt"
@ -75,7 +82,7 @@ job "garage" {
tags = ["garage-rpc"] tags = ["garage-rpc"]
port = 3901 port = 3901
address_mode = "driver" address_mode = "driver"
name = "garage-rpc" name = "garage-rpc"
check { check {
type = "tcp" type = "tcp"
port = 3901 port = 3901