Working SFTP deployment of Garage
This commit is contained in:
parent
9ce6c7ad6e
commit
5df7058c84
1 changed files with 27 additions and 4 deletions
|
@ -13,14 +13,21 @@ job "bagage" {
|
||||||
|
|
||||||
network {
|
network {
|
||||||
port "web_port" { to = 8080 }
|
port "web_port" { to = 8080 }
|
||||||
|
port "ssh_port" {
|
||||||
|
static = 2222
|
||||||
|
to = 2222
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task "server" {
|
task "server" {
|
||||||
driver = "docker"
|
driver = "docker"
|
||||||
config {
|
config {
|
||||||
image = "superboum/amd64_bagage:v8"
|
image = "superboum/amd64_bagage:v9"
|
||||||
readonly_rootfs = true
|
readonly_rootfs = false
|
||||||
ports = [ "web_port" ]
|
volumes = [
|
||||||
|
"secrets/id_rsa:/id_rsa"
|
||||||
|
]
|
||||||
|
ports = [ "web_port", "ssh_port" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
env {
|
env {
|
||||||
|
@ -31,8 +38,23 @@ job "bagage" {
|
||||||
memory = 500
|
memory = 500
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
data = "{{ key \"secrets/bagage/id_rsa\" }}"
|
||||||
|
destination = "secrets/id_rsa"
|
||||||
|
}
|
||||||
|
|
||||||
service {
|
service {
|
||||||
name = "bagage"
|
name = "bagage-ssh"
|
||||||
|
port = "ssh_port"
|
||||||
|
address_mode = "host"
|
||||||
|
tags = [
|
||||||
|
"bagage",
|
||||||
|
"(diplonat (tcp_port 2222))"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "bagage-webdav"
|
||||||
tags = [
|
tags = [
|
||||||
"bagage",
|
"bagage",
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
|
@ -44,6 +66,7 @@ job "bagage" {
|
||||||
check {
|
check {
|
||||||
type = "tcp"
|
type = "tcp"
|
||||||
port = "web_port"
|
port = "web_port"
|
||||||
|
address_mode = "host"
|
||||||
interval = "60s"
|
interval = "60s"
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
check_restart {
|
check_restart {
|
||||||
|
|
Reference in a new issue