aboutsummaryrefslogtreecommitdiff
path: root/app/bagage/deploy
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2021-11-20 14:56:56 +0100
committerQuentin <quentin@deuxfleurs.fr>2021-11-20 14:56:56 +0100
commit5df7058c84904baafda56f03aa46b47b369f7e59 (patch)
treeb62b9bd527d823b65b6e7cbde505b2cc576cec36 /app/bagage/deploy
parent9ce6c7ad6ed3645a2cbf7802106ebb2aa2387cce (diff)
downloadinfrastructure-5df7058c84904baafda56f03aa46b47b369f7e59.tar.gz
infrastructure-5df7058c84904baafda56f03aa46b47b369f7e59.zip
Working SFTP deployment of Garage
Diffstat (limited to 'app/bagage/deploy')
-rw-r--r--app/bagage/deploy/bagage.hcl31
1 files changed, 27 insertions, 4 deletions
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 {