aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--consul/configuration/seafile/conf/seafile.conf.tpl (renamed from consul/configuration/seafile/conf/seafile.conf.sample)2
-rw-r--r--consul/configuration/seafile/conf/seahub_settings.py.tpl (renamed from consul/configuration/seafile/conf/seahub_settings.py.sample)2
-rw-r--r--nomad/seafile.hcl30
3 files changed, 23 insertions, 11 deletions
diff --git a/consul/configuration/seafile/conf/seafile.conf.sample b/consul/configuration/seafile/conf/seafile.conf.tpl
index cfe3592..f224234 100644
--- a/consul/configuration/seafile/conf/seafile.conf.sample
+++ b/consul/configuration/seafile/conf/seafile.conf.tpl
@@ -11,7 +11,7 @@ type = mysql
host = mariadb.service.2.cluster.deuxfleurs.fr
port = 3306
user = seafile
-password = <to be defined>
+password = {{ key "secrets/seafile/ccnet/mysql_pwd" | trimSpace }}
db_name = seafile-db
connection_charset = utf8
diff --git a/consul/configuration/seafile/conf/seahub_settings.py.sample b/consul/configuration/seafile/conf/seahub_settings.py.tpl
index 06aa7d3..6c63ee4 100644
--- a/consul/configuration/seafile/conf/seahub_settings.py.sample
+++ b/consul/configuration/seafile/conf/seahub_settings.py.tpl
@@ -5,7 +5,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'seahub-db',
'USER': 'seafile',
- 'PASSWORD': '<to be defined>',
+ 'PASSWORD': '{{ key "secrets/seafile/ccnet/mysql_pwd" | trimSpace }}',
'HOST': 'mariadb.service.2.cluster.deuxfleurs.fr',
'PORT': '3306',
'OPTIONS': {
diff --git a/nomad/seafile.hcl b/nomad/seafile.hcl
index dc076c6..f118999 100644
--- a/nomad/seafile.hcl
+++ b/nomad/seafile.hcl
@@ -116,11 +116,31 @@ job "seafile" {
destination = "secrets/conf/ccnet.conf.tpl"
mode = "file"
}
- template {
+ template {
source = "secrets/conf/ccnet.conf.tpl"
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 {
+ source = "secrets/conf/seafile.conf.tpl"
+ 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 {
+ source = "secrets/conf/seahub_settings.py.tpl"
+ destination = "secrets/conf/seahub_settings.py"
+ }
+
template {
data = "{{ key \"configuration/seafile/ccnet/mykey.peer\" }}"
destination = "secrets/ccnet/mykey.peer"
@@ -138,14 +158,6 @@ job "seafile" {
destination = "secrets/conf/seafdav.conf"
}
template {
- data = "{{ key \"configuration/seafile/conf/seafile.conf\" }}"
- destination = "secrets/conf/seafile.conf"
- }
- template {
- data = "{{ key \"configuration/seafile/conf/seahub_settings.py\" }}"
- destination = "secrets/conf/seahub_settings.py"
- }
- template {
data = "{{ key \"configuration/seafile/conf/gunicorn.conf\" }}"
destination = "secrets/conf/gunicorn.conf"
}