Migrate seafile

This commit is contained in:
Quentin 2020-12-22 14:31:42 +01:00
parent 846449b238
commit e628dc44ba

View file

@ -10,6 +10,14 @@ job "seafile" {
group "main" { group "main" {
count = 1 count = 1
network {
port "seafile-frontend" { static = 8000 }
port "seafile-seafhttp" { static = 8083 }
port "seafile-dav" { static = 8084 }
port "seafile-hack" { static = 8085 }
}
task "hack" { task "hack" {
driver = "docker" driver = "docker"
config { config {
@ -125,56 +133,45 @@ job "seafile" {
} }
} }
artifact { template {
source = "http://127.0.0.1:8500/v1/kv/configuration/seafile/conf/ccnet.conf.tpl?raw" data = file("../config/configuration/seafile/conf/ccnet.conf.tpl")
destination = "secrets/conf/ccnet.conf.tpl"
mode = "file"
}
template {
source = "secrets/conf/ccnet.conf.tpl"
destination = "secrets/conf/ccnet.conf" destination = "secrets/conf/ccnet.conf"
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/configuration/seafile/conf/seafile.conf.tpl?raw"
destination = "secrets/conf/seafile.conf.tpl"
mode = "file"
}
template { template {
source = "secrets/conf/seafile.conf.tpl" data = file("../config/configuration/seafile/conf/seafile.conf.tpl")
destination = "secrets/conf/seafile.conf" destination = "secrets/conf/seafile.conf"
} }
artifact {
source = "http://127.0.0.1:8500/v1/kv/configuration/seafile/conf/seahub_settings.py.tpl?raw"
destination = "secrets/conf/seahub_settings.py.tpl"
mode = "file"
}
template { template {
source = "secrets/conf/seahub_settings.py.tpl" data = file("../config/configuration/seafile/conf/seahub_settings.py.tpl")
destination = "secrets/conf/seahub_settings.py" destination = "secrets/conf/seahub_settings.py"
} }
template { template {
data = "{{ key \"configuration/seafile/ccnet/mykey.peer\" }}" data = file("../config/configuration/seafile/ccnet/seafile.ini")
destination = "secrets/ccnet/mykey.peer"
}
template {
data = "{{ key \"configuration/seafile/ccnet/seafile.ini\" }}"
destination = "secrets/ccnet/seafile.ini" destination = "secrets/ccnet/seafile.ini"
} }
template { template {
data = "{{ key \"configuration/seafile/conf/mykey.peer\" }}" data = file("../config/configuration/seafile/conf/seafdav.conf")
destination = "secrets/conf/mykey.peer"
}
template {
data = "{{ key \"configuration/seafile/conf/seafdav.conf\" }}"
destination = "secrets/conf/seafdav.conf" destination = "secrets/conf/seafdav.conf"
} }
template { template {
data = "{{ key \"configuration/seafile/conf/gunicorn.conf\" }}" data = file("../config/configuration/seafile/conf/gunicorn.conf")
destination = "secrets/conf/gunicorn.conf" destination = "secrets/conf/gunicorn.conf"
} }
# ---- secrets ----
# @FIXME should be put in the secret hierarchy in consul
template {
data = "{{ key \"configuration/seafile/conf/mykey.peer\" }}"
destination = "secrets/ccnet/mykey.peer"
}
template {
data = "{{ key \"configuration/seafile/conf/mykey.peer\" }}"
destination = "secrets/conf/mykey.peer"
}
} }
} }
} }