From 5df7058c84904baafda56f03aa46b47b369f7e59 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 20 Nov 2021 14:56:56 +0100 Subject: Working SFTP deployment of Garage --- app/bagage/deploy/bagage.hcl | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/bagage/deploy/bagage.hcl b/app/bagage/deploy/bagage.hcl index 130c283..6fdabbb 100644 --- a/app/bagage/deploy/bagage.hcl +++ b/app/bagage/deploy/bagage.hcl @@ -13,14 +13,21 @@ job "bagage" { network { port "web_port" { to = 8080 } + port "ssh_port" { + static = 2222 + to = 2222 + } } task "server" { driver = "docker" config { - image = "superboum/amd64_bagage:v8" - readonly_rootfs = true - ports = [ "web_port" ] + image = "superboum/amd64_bagage:v9" + readonly_rootfs = false + volumes = [ + "secrets/id_rsa:/id_rsa" + ] + ports = [ "web_port", "ssh_port" ] } env { @@ -31,8 +38,23 @@ job "bagage" { memory = 500 } + template { + data = "{{ key \"secrets/bagage/id_rsa\" }}" + destination = "secrets/id_rsa" + } + + service { + name = "bagage-ssh" + port = "ssh_port" + address_mode = "host" + tags = [ + "bagage", + "(diplonat (tcp_port 2222))" + ] + } + service { - name = "bagage" + name = "bagage-webdav" tags = [ "bagage", "traefik.enable=true", @@ -44,6 +66,7 @@ job "bagage" { check { type = "tcp" port = "web_port" + address_mode = "host" interval = "60s" timeout = "5s" check_restart { -- cgit v1.2.3